mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
Use the new macresource module to open the accompanying resource file (if needed).
This commit is contained in:
parent
a5d7da528b
commit
3c06b9a7d4
13 changed files with 37 additions and 102 deletions
|
@ -9,6 +9,7 @@ from Carbon import Controls
|
|||
from Carbon import List
|
||||
import sys
|
||||
import struct
|
||||
import macresource
|
||||
|
||||
#
|
||||
# Resource definitions
|
||||
|
@ -21,14 +22,7 @@ LEFT=200
|
|||
TOP=64
|
||||
|
||||
def main():
|
||||
try:
|
||||
dummy = Res.GetResource('DLOG', ID_MAIN)
|
||||
except Res.Error:
|
||||
try:
|
||||
Res.FSpOpenResFile("PICTbrowse.rsrc", 1)
|
||||
except Res.Error, arg:
|
||||
EasyDialogs.Message("Cannot open PICTbrowse.rsrc: "+arg[1])
|
||||
sys.exit(1)
|
||||
macresource.need('DLOG', ID_MAIN, "PICTbrowse.rsrc")
|
||||
PICTbrowse()
|
||||
|
||||
class PICTbrowse(FrameWork.Application):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue