From: Jim I. <ji...@ap...> - 2002-03-06 01:02:44
|
On Tuesday, March 5, 2002, at 04:11 PM, Jon Guyer wrote: > At 2:21 PM -0800 3/5/02, Jim Ingham wrote: > >> First, why won't it load into Aqua Wish? What errors do you get? > > Being ignorant about such things, I copied tclAE2.0 into > /System/Library/Frameworks/Tcl.framework/Versions/8.4/Resources, which > is the equivalent auto_path entry to where it's installed for tclsh. > > () 1 % package names > http registry dde tclAE tcltest opt msgcat Tk Tcl > () 2 % package require tclAE > > Wish goes boom "The application Wish Shell has unexpectedly quit..." > > dyld: /Applications/Wish Shell.app/Contents/MacOS/Wish Shell Undefined > symbols: > _Tclae_SafeInit > > I'll grant, there is no such routine. Does there need to be? TclAE is > most decidedly /not/ safe. Yes, but if it is not safe, it is better to have a Tclae_SafeInit that returns TCL_ERROR. That is positively stating that you are not safe, rather than leaving it to someone to infer that you are. > > >> Second, it is very odd that it receives the event, since there isn't >> an event loop that is listening to Apple events. I don't really >> know how Apple Events are delivered in X. I'll ask around... > > AppleEvents are delivered to AE handlers asynchronously. No event loop > needed. This is not the way that it worked on 9, right. IIRC, you got a high level event in your event queue, which you had to service to get the event to be processed... > >> Third, you have to have an App Signature registered with whoever is >> sending events between Apps (probably the Window Server). > > Actually, what's needed is an AEAddressDesc, which is one of: > typeApplSignature, typeSessionID, typeTargetID, or > typeProcessSerialNumber. Can we get any of these for Tcl (tclsh)? tclsh > has a eunuchs PID; can this be translated to a ToolBox PSN? You can do a PID to PSN translation, there is an API for this in HIToolbox in Processes.h. But I bet that tclsh doesn't have a psn. It isn't registered with the WindowServer yet... Jim -- Jim Ingham ji...@ap... Developer Tools - gdb Apple Computer |