Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!srcsip!smallberries!mnkonar From: mnkonar@smallberries.SRC.Honeywell.COM (Murat N. Konar) Newsgroups: comp.sys.mac.programmer Subject: Re: GetResource in a WDEF - does it work? Message-ID: <37263@srcsip.UUCP> Date: 1 Nov 89 17:33:23 GMT References: <2793@taux01.UUCP> Sender: news@src.honeywell.COM Reply-To: mnkonar@src.honeywell.com (Murat N. Konar) Organization: ipd Lines: 22 In article <2793@taux01.UUCP> cyosta@taux01.nsc.com ( Yossie Silverman ) writes: >I am writing a WDEF which needs to do some GetResource calles. It seems >that these are all returning NIL but not setting ResError to anything >usefull. I was doing a GetMenu in the WDEF and it wouldn't, so I moved GetResource will not set ResError if it can't find the resource you want. It returns nil. I beleive this is documented in IM V1. Another thing to look out for is that your resource file may not be in the resource search path when your WDEF is called (i.e. under Multifinder). The solution here is to get handles to all the resources you want to access during the WDEF's initialization routine and store them for later use. I would think hard about trying to pop up a menu inside a WDEF (It seems like this is what you want to do). I tried this and while it worked, it was kind of a kludge. There are probably better ways to do what you want. ____________________________________________________________________ Have a day. :^| Murat N. Konar Honeywell Systems & Research Center, Camden, MN mnkonar@SRC.honeywell.com (internet) {umn-cs,ems,bthpyd}!srcsip!mnkonar(UUCP)