[comp.sys.mac.programmer] Notification Manager at Boot

jackiw@cs.swarthmore.edu (Nick Jackiw) (02/15/89)

First, my hat's off to the net. Bravo, folks, you're the best.

Now on to the meat dish:

I want to use the Notification Manager in a sys-heap task (hooked into
GetNextEvent) which is installed at boot.  According to TN#184, the
NM is only around is System 6.0 or later, so I have to check whether
that's present at INIT time. Unfortunately, IM V-5 says "All of the
Toolbox Managers must be initialized before calling SysEnvirons." So,
that rules out SysEnvirons.  Now if I try "Checking for Specify
Functionality" ala TN#156, by comparing trap 0x5E (NMInstall)'s address
to trap 0x9F (UnImplementTrap), the comparison FAILS under old systems,
where the Notification Manager is undefined. 

Q: HOW DO I TELL IF I CAN USE IT DURING MY INIT, SO I CAN CONFIGURE MY
FUTURE BEHAVIOR APPROPRIATELY?

Any responses, official or un-official, will be thoroughly enjoyed. And
appreciated.

-Nick


-- 
+-------------------+-jackiw@cs.swarthmore.edu / !rutgers!bpa!swatsun!jackiw-+
|  nicholas jackiw  | jackiw%campus.swarthmore.edu@swarthmr.bitnet           |
+-------------------+-VGP/MathDept/Swarthmore College, Swarthmore, PA 19081--+
By the time my employer decides on its opinion, I'll be dead.

tecot@Apple.COM (Ed Tecot) (02/25/89)

In article <2430@ilium.cs.swarthmore.edu> jackiw@swatsun.UUCP () writes:
>Now if I try "Checking for Specify
>Functionality" ala TN#156, by comparing trap 0x5E (NMInstall)'s address
>to trap 0x9F (UnImplementTrap), the comparison FAILS under old systems,
>where the Notification Manager is undefined. 
>
>Q: HOW DO I TELL IF I CAN USE IT DURING MY INIT, SO I CAN CONFIGURE MY
>FUTURE BEHAVIOR APPROPRIATELY?

You've got the right idea.  I suspect that you are using GetTrapAddress
instead of NGetTrapAddress.  By doing so, you are finding that BitSet, which
is TOOLBOX trap 0x5E is installed.  NMInstall is an OS trap.  The correct call
is NGetTrapAddress(0x5E, OSTrap).

						_emt