>At 01:36 PM 5/4/99 -0700, you wrote:
> >Hi all,
> >
> >Bare with me I'm new to this event stuff.
> >
> >I can't figure out where to build and initialize my data structures so
> >that they remain available only when a user is in a particular form. I
> >know I could make them *Global* , but as we all know this is not good!
> >:)
> >
One solution is to add a gadget to your form and use the API to set
it's data to the global data for the form:
pGlobals = MemPtrNew(sizeof(MyGlobalType));
// Check errors and set data values
FrmSetGadgetData(pForm, uwGadgetID, pGlobals);
Then when you need a global:
pData = FrmGetGadgetData(pForm, uwGadgetID);
When the form is closed, the system automatically takes care of
disposing of the form's objects, including any chunk attached to a
gadget.
JB
[EMAIL PROTECTED]
True North, Inc.