home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!rutgers!igor.rutgers.edu!math.rutgers.edu!landwebe
- From: landwebe@math.rutgers.edu (Peter Landweber)
- Newsgroups: comp.sys.mac.programmer
- Subject: Problem writing INIT/cdev
- Summary: trying to get the Finder to open a
- Control Panel that is already open
- Message-ID: <Sep.3.01.53.43.1992.13837@math.rutgers.edu>
- Date: 3 Sep 92 05:53:43 GMT
- References: <1992Aug27.002347.14632@vax5.cit.cornell.edu>
- Distribution: comp
- Organization: Rutgers Univ., New Brunswick, N.J.
- Lines: 27
-
-
-
- I am working on an INIT/cdev combination to be used under System
- 7, and I've run into a problem.
- At startup time, the INIT moves its resource map after the system
- resource map in the linked list, and it patches CloseResFile() to
- ignore the file. The result is that my file stays open, and its
- resources are always available. This is similar to what Suitcase II
- does with font suitcases. So far everything has gone extremely well
- using this technique.
- Now, I'm trying to add a "cdev". The problem is that when the
- finder opens up my file as a Control Panel, it expects my file's
- resource map to be the first in the linked list. Since the resource
- map is actually at the end of the linked list, the finder crashes.
-
- So, my questions are:
- 1) Is there a way for the Finder to open up a Control Panel if the
- file is already open, and its resource map is not at the front of the
- linked list?
- 2) Is there a way to open a file twice, with two separate resource
- maps? That way, I could still have one resource map linked after the
- system resource map, and the other at the front of the linked list.
- One of the maps could be read-only if necessary.
-
- Any suggestions, answers, or solutions would be greatly appreciated.
-
- -- Greg Landweber (landwebe@math.rutgers.edu)
-