[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reopening resource files calls CurResFile!?
- To: email@example.com, firstname.lastname@example.org
- Subject: Re: Reopening resource files calls CurResFile!?
- From: email@example.com (Mike Engber)
- Date: Thu, 30 Jan 92 20:29:13 CST
- Cc: eliot@unix1.CS.UMASS.EDU
I believe that OpenResFile making that file current is a well known bug :-)
I don't know if it's considered an OS bug or an IM bug. I believe the
resource manager operates this way in all the systems (so it aint a 7.0 bug)
Here is what I believe is going on. My little arrow diargrams shows the
linked list of open res files. The caret marks the current res file .
(I hope you view this in a mono space font)
then you open A
then you open B
then you re-open A
Note: now you can't find any resources in B
then you open a Fred Window
Note: Now you can see the resources in B again
I believe this correctly explains all the behavior you mentioned. You
didn't do a final cur res file after opening that Fred window, but I'll
bet it is some new id (not A's).
I don't know if this is documented anywhere. I think I did a set of
experiments to find this all out.
In oodles-of-utils I define a macro called with-res-file that handles
all this so you don't get into trouble. It alway restores the current
res file on exit.
In addition, it has options to create a rsrc file if the one you
specified doesn't exist (or doesn't have a rsrc fork), it also has an
options to leave or not leave the specified rsrc file open depending on
if it was already open.