Greetings,

In response to a user picking an option from a pop-up list, I'd like to
dynamically add some widgets (in this case, a label) to a form.  In my
form's event handler, I've inserted the following code:


        case popSelectEvent:
                frmP = FrmGetActiveForm();
                theLabelPtr = FrmNewLabel( &frmP, 5000, "Wowza", 20, 100, stdFont); 
                FrmDrawForm( frmP);
                handled = true; 
                break;

This in fact adds the new label to the form, and even shows it, but the
label on the pop-up list doesn't change, since I've claimed to have
handled the event.  However, when I don't return true (i.e. I leave
'handled' false) the debugger first tries to find MacStubs.c (in order
to show the offending source, I assume) and (when I decline to provide
that file) posts the following message:

File: MemoryMgrNew.c, Line: 4023, Invalid chunk ptr


I even added a (what I assume is a useless call)

                FrmSetActiveForm( frmP);

just before the FrmDrawForm call, but still get the error.

What am I missing? Any ideas?

Many thanks,

Erik Steinmetz
[EMAIL PROTECTED]

Reply via email to