On 16/01/07, Jonathan Johnson <email@hidden> wrote:
For even more fun times of beating multiple dead horses, you can even
load these methods up dynamically and call into Objective-C from PEF
applications <evil grin>.
If you're still using PEF then you're beyond help. :o)
Well, technically it isn't me *using it*, but our users. REALbasic can
compile an app that uses WebKit on 10.2.8 and higher that still works
on Mac OS 8.6 as well. Of course, most are probably compiling Mach-O
by now for Intel support, but two-three years ago (when I originally
did the above), there were still quite a few OS 9 holdouts.
These days, it's getting harder and harder to avoid at least
some Obj-C in Carbon applications (WebKit, Core Image, etc only expose
an Obj-C API), and fearing that is irrational.
True. However, some of us still do need to compile in CW for legacy
PEF support for a little bit longer.
However, even with the above code, it is
*infinitely* easier to simply write:
int WindowGetWindowNumber( WindowRef win )
{
NSWindow *win = [NSWindow initWithWindowRef:win];
int out = [win windowNumber];
[win release];
return out;
}
Except you can't *do* anything with a window number without relying on
SPI, and there's SPI for getting a CGSWindowID from a WindowRef
directly (without instantiating a special NSWindow hackhackhack for
representing non-Cocoa windows).
Well, I didn't say anything about it being something interesting to
do :) I actually missed the beginning of the conversation and was just
trying to be helpful, not realizing the person I replied to actually
answered it the first time around :)
-Jon
--
Jonathan Johnson
email@hidden
REAL Software, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden