>Does anyone know how long a typical form pointer is good for, is it good >for the duration that the form is loaded? > >i.e. >pFrm = FrmGetActiveForm(); >pObj = FrmGetObjectPtr( .... ); > >What I'd like to do is use statics for often accessed objects and the >active form, that I can use until that form is closed. >Constantly calling FrmGetActiveFrm etc seems like a big waste of overhead. > >Same question towards the objects, I want to get pointers to often >accessed objects on form open, and rely on them until form close.
As long as the form hasn't been deleted, and you're not doing any dynamic UI, then I think the form pointer and object pointers will remain valid. But once you add a single new form object, you have to assume that every pointer is invalid. -- Ken -- Ken Krugler TransPac Software, Inc. <http://www.transpac.com> +1 530-470-9200 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
