[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suspend/Resume Event
- To: lynch@aristotle.ils.nwu.edu
- Subject: Re: Suspend/Resume Event
- From: bill@cambridge.apple.com (Bill St. Clair)
- Date: Mon, 1 Jun 1992 15:55:07 -0500
- Cc: info-mcl
>What would be the best way in 2.0 final to catch events? Is *event-hook*
>obsolete or down-graded now?
>
>The intent in this instance is to allow programmers to add functions to a
>couple global lists to be called on suspend/resume events, so there may
>already be some functionality provided by MCL for this.
>
*eventhook* is still the only way other than patching.
>BTW:
>Today, I actually had to open up a reference book (Mac Revealed, v. 4) in
>order to figure out what the names of some constants were. Since I do this
>as little as possible (keeping in mind the Mac philosophy), I was wondering
>if there isn't some way of working backwards from a given number, say 15,
>to finding all the constants in the constants.idx whose value is that
>number.
>
>Forgive me if I'm being stupid here, I'm not quite sure how #$ works with
>constants.idx and defconstant...
I've always had a hard time understanding how anyone can program the
Macintosh without a copy of Inside Macintosh. In the perfect world,
where there were high level Lisp interfaces for all of the toolbox
managers, you could probably get away with it. We are not yet living
in that perfect world.
The format of "constants.idx" changed between 2.0b1 and 2.0 final.
In 2.0b1 it looked like:
<header>
name0
file0
pos0
name1
file1
pos1
...
In 2.0 final, it looks like
<header>
name0
file0
pos0
value0
name1
file1
pos1
value1
...
Where nameI is the name of the constant, fileI is the file in which
it is defined, offsetI is the file-position of the definition in the
file, and valueI is the value of the constant.
Hence, in 2.0b1, you need to open lots of files to find what
you're looking for (you might as well call READ on each of the
interface files looking for (defconstant ...) forms).
In 2.0 final, you can do a simple text search on the constants.idx file.
>
>REALLY STUPID QUESTION:
>After tracking this down to EVENTS.lisp, I gotta wonder...what happened to
>number 9? All the other numbers get an event, how come s/he doesn't?
Perhaps the author was a fan of the Beatles White Album :)