> > >   frmP = FrmInitForm (AboutForm);
> > >
> > >   FrmSetActiveForm(frmP);
> > >
> > >   CtlSetValue((ControlType *)GetObjectPtr(AboutTestCheckbox),0);
> > >
> > >   FrmDoDialog (frmP);   // Display the About Box.
> > >
> > >   Int16 iTemp = CtlGetValue((ControlType
> > > *)GetObjectPtr(AboutTestCheckbox));
> > >
> > >   // This is the line that doesn't work.
> >
> > of course not. AboutTestCheckbox was displayed modally. it is no longer
> the
> > current form. in fact it is not anything - it is history. so even if you
> had
> > saved the return value from the first call to GetObjectPtr, it would not
> > help you now.
> >
> > you have a problem of design. the only value you get back from a modal
> > dialog is the ID of the button that was pushed.
>
> Wrong -- the form for FrmDoDialog exists from the time its FrmInit'd until
> the time it is FrmDelete'd.  Its only active and displayed inside the
> FrmDoDialog() call, but it exists and its controls can be manipulated both
> before and after its displayed.

I stand corrected. In that case it is just the second call to GetObjectPtr
that is wrong, as the form is no longer active (at least we can agree on
that one). So if he saves the return from his first GetObjectPtr, all should
be well.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to