From: Jim I. <ji...@ap...> - 2002-03-06 01:22:36
|
On Tuesday, March 5, 2002, at 04:22 PM, Daniel A. Steffen wrote: > At 14:21 -0800 on 5/3/02, Jim Ingham wrote: >> 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... > > I think as long as an AE handler is registered, AE's are received, I > suspect this might be plugged in on top of carbon events? e.g. AlphaX > doesn't see AE's destined for tclAE in its WNE event loop. OTOH clearly > neither tclsh nor tclAE is calling RAEL Yeah, this is what strikes me as curious. On 9 you have to handle the high level events by hand. Who is doing this behind our back? > >> Third, you have to have an App Signature registered with whoever is >> sending events between Apps (probably the Window Server). Tcl doesn't >> do that, so it loses (of course Wish does). I wouldn't want to do >> this by default in Tcl, since that involves linking with alot of the >> ApplicationServices stack, and this sometimes means you connect to the >> Window Server on launch, which would be bad. But I bet there is an >> API to do this, so you could add a command to TclAE to register >> yourself, and then you would be available for external sends... > > I've actually noticed the other day that tclAE doesn't load if you're > logged in remotely and not root (with the usual port permission errors > you get when trying to connect to the window server from an > unauthorized source): > > kCGErrorIllegalArgument : initCGDisplayState: cannot map display > interlocks. > kCGErrorIllegalArgument : CGSNewConnection cannot get connection port > kCGErrorIllegalArgument : CGSNewConnection cannot get connection port > kCGErrorInvalidConnection : CGSGetEventPort: Invalid connection > > so some kind of registration with the window server seems to take place > when we load TclAE and thus Carbon (as we obviously need > AE.framework ...) > > when root, tclAE will load but e.g. the finder still doesn't accept > AE's from you... Yeah, some of the libraries (HIToolbox among them) have init routines that run when the library is loaded and try to connect to the Window Server. But if you don't own the window server, they you aren't allowed to do this. That is probably what is happening here. JIm -- Jim Ingham ji...@ap... Developer Tools - gdb Apple Computer |