Thread

Re: VB Wrapper - Callback Functions & AWCitizenAttributesBYNumber (Bots)

Re: VB Wrapper - Callback Functions & AWCitizenAttributesBYNumber // Bots

1  |  

sado

Sep 23, 2000, 1:48am
[View Quote] > I'm not a VB person, but am I wrong in assuming that, having installed a
> callback function, you should get the result of your citizen query inside
> the callback, and not in the calling function? It seems to me that what you
> call your callback is the calling function.... And, do you sent the bot
> instance before calling sdk2.AwCitizenAttributesByNumber(i) ?
>

That's a very important step. Don't forget to do an AW.Init, an AW.Create, and
an AW.Login...

>
> AwCitizenAttributesByNumber, in the calling function, should not block or
> give you a valid answer if you installed a callback, the answer comes in the
> callback itself.
>

Right-o. So you gotta make your code a state machine instead of a linear
script...

>
> In
> sdk2.AwCallbackSet AW_CALLBACK_CITIZEN_ATTRIBUTES
> where is the pointer to callback function ? AwCallbackSet has, in C, two
> parameters: the type of callback, in this case
> AW_CALLBACK_CITIZEN_ATTRIBUTES, and a pointer to an entry point for the
> callback function itself. I don't know how to do this in VB, but it seems
> to be missing here.
>

That's because MrGrimm (in his infinite wisdom ;) has created a number of events
in the ocx which are triggered when the callbacks are fired (named, oddly
enough, AWCallback_XXX) Sure, it's not so elegant as C would make things, but
doing pointers (even function pointers) in VB is really, really painful.

Sado

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn