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

@ -5,6 +5,7 @@ from Carbon import Dlg
import sys
import socket
import string
import macresource
#
# Definitions for our resources
ID_MAIN=512
@ -15,14 +16,7 @@ ITEM_RESULT=2
ITEM_LOOKUP_BUTTON=3
def main():
try:
dummy = Res.GetResource('DLOG', ID_MAIN)
except Res.Error:
try:
Res.FSpOpenResFile("dnslookup-2.rsrc", 1)
except Res.Error:
EasyDialogs.Message("Cannot open dnslookup-2.rsrc")
sys.exit(1)
macresource.need("DLOG", ID_MAIN, "dnslookup-2.rsrc")
DNSLookup()
class DNSLookup(FrameWork.Application):