Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!casbah.acns.nwu.edu!ils.nwu.edu!engber From: engber@ils.nwu.edu (Mike Engber) Newsgroups: comp.sys.mac.programmer Subject: I want to write Add1ResMenu() Summary: not to be confused with AddResMenu() Message-ID: <1387@anaxagoras.ils.nwu.edu> Date: 16 Apr 91 14:33:55 GMT Organization: The Institute for the Learning Sciences Lines: 37 I have need of Add1ResMenu(), a function which would behave like AddResMenu(), but only search the current rsrc file. Here`s my current attempt: void Add1ResMenu(MenuHandle theMenu, ResType theType){ short i; short resCount; resCount = Count1Resources(theType); for(i=1; i<=resCount; ++i){ short resId; ResType resType; Str255 resName; Handle resHandle; resHandle = Get1IndResource(theType,i); if(resHandle){ GetResInfo(resHandle,&resId,&resType,resName); if(resName[0]>0 && resName[1]!='.' && resName[1]!='%'){ AppendMenu(theMenu,resName); } } } } The problem is that I'd like to call ReleaseResource on resources that haven`t already been gotten (i.e. someone previously called GetResource or GetNamedResource on it). But how do I know if a resource has already been gotten? And while your at it. There is one more resouce file question I have. Is there any way I can get a list of all the currently opened resource files and/or check if a particular resource file is already open. Please respond via email if possible. -ME