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

@ -10,6 +10,7 @@ from Carbon import List
import sys
import struct
from Carbon import Icn
import macresource
#
# Resource definitions
@ -26,14 +27,7 @@ MAXWIDTH=320
MAXHEIGHT=320
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")
ICONbrowse()
class ICONbrowse(FrameWork.Application):