ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Quirky Event Delivery (Sdk)
Quirky Event Delivery // SdkgrimbleJul 3, 2002, 5:03am
Something is causing me huge problems recently to do with the delivery of
events when I REALLY don't want them. When processing an event, you expect to have a clean thread where the code will execute until you relinquish process control. Recently, however, I've been hitting more and more problems where the SDK is firing off events to the application simply because I made a call to the SDK from within an event handler. I'm reasonably certain that this is a relatively new problem, since I've done what I'm attempting now on several occasions before and its nothing special. Maybe I just got away with it those times. A specific example is when processing an AW_EVENT_AVATAR_ADD, I want to call aw_citizen_attributes_by_number to retrieve some additional attributes on the user. Unfortunately, this causes the avatar add event for another avatar present to be raised mid-process, incrementing store counters and generally making a mess of things. It also means that avatar change events are being processed (and being ignored/reported by a - I thought - pointless sanity check) before the code has finished handing that avatar's add event. I could put an event queue into the app and just populate it from the event handlers and process that queue event by event (which is the only workaround I can see at the moment), but it seems an unnecessary uverhead when I'm already supposed to be doing that by processing the SDK events themselves. The events are definitely originating from within the aw_citizen_attributes_by_number call (the first time my app gets involved after the call is at the top of the handler for the next event). Is anyone else experiencing this/solved it? ... 'cos its starting to drive me nuts going round in circles like this. Grims. milestegJul 3, 2002, 6:47am
"grimble" <grimble2000NOSPAM at btinternet.com> a écrit dans le message de
news: 3d22a1bc at server1.Activeworlds.com... > Something is causing me huge problems recently to do with the delivery of > events when I REALLY don't want them. > > When processing an event, you expect to have a clean thread where the code > will execute until you relinquish process control. Recently, however, I've > been hitting more and more problems where the SDK is firing off events to > the application simply because I made a call to the SDK from within an event > handler. I'm reasonably certain that this is a relatively new problem, since > I've done what I'm attempting now on several occasions before and its > nothing special. Maybe I just got away with it those times. [CUT] > Is anyone else experiencing this/solved it? ... 'cos its starting to drive > me nuts going round in circles like this. > > Grims. > > Hello Grims, What you describe is exactly how sdk is said to work :) it is written in the sdk help , at the end of this page: http://www.activeworlds.com/sdk/events.htm and as they stated, install callbacks to avoid this :) Regards, MilesTeg dionJul 3, 2002, 6:52am
grimbleJul 3, 2002, 10:12am
Thanks MilesTeg ...
I'd like to adjust your statement slightly to "install the RIGHT DARNED CALLBACK to avoid this, dopey!" if that's ok. Grims [View Quote] milestegJul 3, 2002, 3:18pm
LOL
English is not my language so i prefer to stick to a kinder way to say things ;))) Regards, MilesTeg "grimble" <grimble2000NOSPAM at btinternet.com> a écrit dans le message de news: 3d22ea3b$1 at server1.Activeworlds.com... > Thanks MilesTeg ... > > I'd like to adjust your statement slightly to "install the RIGHT DARNED > CALLBACK to avoid this, dopey!" if that's ok. > > Grims > [View Quote] |