Alright, a couple of tufts of hair later and I'm still no further on with
this stupid problem. Someone, please rack your brain and tell me what I'm
doing wrong.

In a vain attempt to try and locate the source of this problem I've changed
a few things in my code:

- I've removed any reference to the userdata I was providing. Which as it
turns out, didn't make any difference. The application still crashed.

- The only remaining message I deal with in my despatcher is now OM_NEW,
which calls the function below like this:

#ULONG SAVEDS ASM MCC_Message_Despatch(REG(a0,struct IClass *cl),
REG(a2,Object *obj), REG(a1,Msg msg))#
#    {#
#        switch(msg->MethodID)#
#            {#
#                case OM_NEW:#
#                    return MCC_Message_New(cl,obj,(APTR)msg);#
#            }#
##
#        return DoSuperMethodA(cl,obj,msg);#
#    }#

#ULONG SAVEDS MCC_Message_New(struct IClass *cl, Object *obj, struct opSet
*msg)#
#    {#
#        /* create class */#
#        obj = (Object *)DoSuperNew(cl, obj,#
#                MUIA_Window_ID,    MAKE_ID('T','E','S','T'),#
#                MUIA_Window_Title,  "Test Window",#
##
#                WindowContents, VGroup,#
#                    Child, SimpleButton("Test"),#
#                End,#
#            TAG_MORE, msg->ops_AttrList);#
##
#        if(obj)#
#            {#
                #DoMethod(obj, MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
obj, 3, MUIM_Set, MUIA_Window_Open, FALSE);#
#                return((ULONG)obj);#
#            }#
#    }#

As already mentioned in the previous email, I add this new window on demand
with the following calls:

#newwin = (Object*)NewObject(MCC_Message->mcc_Class, NULL, TAG_DONE);#
#if(newwin) DoMethod(app, OM_ADDMEMBER, newwin);#

Everything works fine, as it should I imagine, but as soon as I press that
close window gadget, it's goodnight. Reset required. Having a look at the
stack trace I can see the last MUIish call is MUIP_FreeVec()

Can anyone please see anything wrong with the way I'm doing this? Last
attempt before I scrap the whole lot until next year, I can't be done with
crappy Windows programming at work and this is stressing me out even more
at home now :-)

Regards
Daniel


------------------------ Yahoo! Groups Sponsor --------------------~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/VpTY2A/lzNLAA/yQLSAA/16uqlB/TM
--------------------------------------------------------------------~-> 

Visit http://www.amiga.dk/tumult for MUI-related
information, especially about MUI custom classes. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MUI/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to