Use the new macresource module to open the accompanying resource file (if needed).

This commit is contained in:
Jack Jansen 2001-08-27 21:41:23 +00:00
parent a5d7da528b
commit 3c06b9a7d4
13 changed files with 37 additions and 102 deletions

View file

@ -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):