ok i think i know what is going on. basically the curent plugin architecture
sucks. that is why we are replacing it in 2.0. what is happening is that when
CreateUI is called SetTarget might not have been called. so you have a NULL
pointer. It works now bc by the time the dialog procedure quites it has been
called. The real way to fix all this is to remove all the Set calls and put all
this info in the context. then there would be no race condition. I have a crap
load of stuff to do for 1.5 but if you wanna do it i would be glad to answer
questions and help you out.

elrod

Michael Rich wrote:

> >weird, that should work... i will look into it. where are you making this
> call
> >from? your constructor?
>
> I've just placed my code inline with the 1.3.1 version of the Simple.ui
> plugin.  I call a function to intialize things in:
>
> void SimpleUI::CreateUI()
>
> and one of them failed, and i tried calling:
>
> m_target->AcceptEvent(new Event(CMD_QuitPlayer));
>
> and it GPF'd.
>
> basically like so:
>
> void SimpleUI::CreateUI()
> {
>         if (!InitInstance())
>         {
>                 m_target->AcceptEvent(new Event(CMD_QuitPlayer));
>                 return;
>         }
> }
>
> however it completely blows up.  I would have thought it worked because the
> original code ad the AcceptEvent at the very bottom of the CreateUI
> function.
>
> mike

Reply via email to