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

@ -7,6 +7,7 @@ from Carbon import Dlg
import sys
import socket
import string
import macresource
#
# Definitions for our resources
ID_MAIN=512
@ -15,15 +16,10 @@ ITEM_LOOKUP_ENTRY=1
ITEM_RESULT=2
ITEM_LOOKUP_BUTTON=3
ITEM_QUIT_BUTTON=4
def main():
"""Main routine: open resource file, call dialog handler"""
try:
Res.FSpOpenResFile("dnslookup-1.rsrc", 1)
except Res.Error:
EasyDialogs.Message("Cannot open dnslookup-1.rsrc")
sys.exit(1)
macresource.need("DLOG", ID_MAIN, "dnslookup-1.rsrc")
do_dialog()
def do_dialog():