[Python-checkins] CVS: python/dist/src/Mac/Demo/PICTbrowse ICONbrowse.py,1.7,1.8

Jack Jansen jackjansen@users.sourceforge.net
Mon, 27 Aug 2001 14:41:00 -0700


Update of /cvsroot/python/python/dist/src/Mac/Demo/PICTbrowse
In directory usw-pr-cvs1:/tmp/cvs-serv5598/Python/Mac/Demo/PICTbrowse

Modified Files:
	ICONbrowse.py 
Log Message:
Use the new macresource module to open the accompanying resource file (if needed).

Index: ICONbrowse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Demo/PICTbrowse/ICONbrowse.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ICONbrowse.py	2001/08/25 12:05:28	1.7
--- ICONbrowse.py	2001/08/27 21:40:58	1.8
***************
*** 11,14 ****
--- 11,15 ----
  import struct
  from Carbon import Icn
+ import macresource
  
  #
***************
*** 27,38 ****
  
  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)	
  	ICONbrowse()
  
--- 28,32 ----
  
  def main():
! 	macresource.need('DLOG', ID_MAIN, "PICTbrowse.rsrc")
  	ICONbrowse()