Tam Hanna a écrit : > I am not 100 percent sure about what you want to acheive and why you dont go > for FrmPopupForm. However, in a project currently in devel. this code is > used(excerpt): > > FormPtr pForm=FrmInitForm(AlmForm); > //init form here(we draw it here) > UInt32 cmd=FrmDoDialog(pForm); > //close text handle here > FrmDeleteForm(pForm); > > Best regards and hope it helps
Yes, it does. I now fetch the resource handle outside of the form handler, and release it after returning from FrmDoDialog. Even better: no static variable. Thanks. -- Luc Le Blanc > Luc le Blanc wrote > Subject: Dialog form not getting default button with vchrLaunch > From: Luc Le Blanc <[EMAIL PROTECTED]> > Date: Mon, 11 Jul 2005 22:32:02 -0400 > X-Message-Number: 26 > > I have a modal dialog that needs to keep a static handle to a text > resource. I run this dialog with FrmDoDialog. Since such dialogs do not > receive a frmOpenEvent, I provoke one to load the resource. I free the > resource when either the OK or the Cancel button is tapped. Alas, if the > user taps on the Home (vchrLaunch) silkscreen button instead, the form > default button (Cancel in my case) is not called, thus not freeing the > handle. The subsequent FrmDeleteForm thus crashes with a dm handle being > deleted. I was hoping to handle this in the frmCloseEvent, but a form > run with FrmDoDialog does not receive such an event (why?) What am I > supposed to do? > > -- > Luc Le Blanc -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
