"Matt Mason" <[EMAIL PROTECTED]> wrote in message
news:34069@palm-dev-forum...
>
> Assuming that you are all right, it seems like bad style to create a
global
> var for every item in my edit form.  I can't make it a local var because
it
> will get reset with each new event that is called.  OR... maybee I have
that
> methodology wrong too?

Define a struct to hold the information for your form.  On the
formOpenEvent, allocate space for it on the dynamic heap, and save the
pointer or handle in a global variable.  In the various event handlers,
modify this through the pointer or handle, and deallocate space in the
frmCloseEvent.  That combines the power of globals, but avoids polluting the
global namespace as much and saves memory when your form isn't in use.

--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>



-- 
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