XRtn A couple more events not clear

External developers... This forum's for you!

XRtn A couple more events not clear

Postby Dave_Higgins » Thu Oct 21, 2010 3:51 am

A couple more events to ask about:

Code: Select all
// •• MDL 10-29-00 ••
// Let xrtns register for the new init and dump events
   xinitEvent,
   xdumpEvent,

for xinitEvent: At first I was thinking this is a trap for SC's shareInit message, but that would be hard to intercept before SC processes it, seeing that the SLG entry for shareInit says "This is the first message sent", and no opportunity has existed yet to load the XRtn and register for the event...

Next thought was that it's sent as the XRtn is loaded (first run), but it seems that this would be hard to trap, also, since the XRtn has to already be loaded in order to register for the event. Can't put that cart before the horse.

Then I registered for xinitEvent and poked around my project doing a number of things (creating objects, opening other projects, etc...) but still haven't seen xinitEvent being triggered.

I did find that xdumpEvent runs on quit, after closeProject is sent down the pipe starting with the current card. Is this going to be the final message on quit, then? It looks like maybe a nice place to release things that need to be, before closing up shop.

I tried running UnloadXRTN() to see if that triggers xdumpEvent (which I suspect will if xdumpEvent can be sent before UnloadXRTN() actually unloads everything), but couldn't get the code right to avoid "pointer being freed was not allocated". I'll suss that out later if I think I need to actually utilize UnloadXRTN(). I'm sure it's just a matter of getting things in the right order.
Last edited by Dave_Higgins on Thu Oct 21, 2010 8:54 am, edited 1 time in total.
My two favorite teams are Detroit and whoever's playing Chicago.
User avatar
Dave_Higgins
 
Posts: 454
Joined: Mon Jul 07, 2008 9:50 am
Location: Dark Side Of The Moon

Re: XRtn A couple more events not clear

Postby codegreen » Thu Oct 21, 2010 8:24 am

Dave Higgins wrote:xinitEvent: At first I was thinking this is a trap for SC's shareInit message, but that would be hard to intercept before SC processes it, seeing that the SLG entry for shareInit says "This is the first message sent", and no opportunity has existed yet to load the XRtn and register for the event...

xinitEvent is currently not sent.

I did find that xdumpEvent runs on quit, after closeProject is sent down the pipe starting with the current card. Is this going to be the final message on quit, then? It looks like maybe a nice place to release things that need to be, before closing up shop.

xdumpEvent has nothing to do with quitting per se. It's sent when an XRtn is about to be unloaded, whatever the reason.

-Mark
codegreen
 
Posts: 1510
Joined: Mon Jul 14, 2008 11:03 pm

Re: XRtn A couple more events not clear

Postby Dave_Higgins » Thu Oct 21, 2010 8:56 am

mark wrote:xdumpEvent has nothing to do with quitting per se. It's sent when an XRtn is about to be unloaded, whatever the reason.

Looks good on paper. :)
My two favorite teams are Detroit and whoever's playing Chicago.
User avatar
Dave_Higgins
 
Posts: 454
Joined: Mon Jul 07, 2008 9:50 am
Location: Dark Side Of The Moon


Return to Xcode and the Internals Toolbox

Who is online

Users browsing this forum: No registered users and 1 guest

cron