I do have similar assertions in my code because I've always been nervous
about the disconnect between Constructor resources and my code. They helped
me notice the changing IDs, in fact.

Great advice, nevertheless.

-JB
----------------------------------------------
JB Parrett                 [EMAIL PROTECTED]
Palm, Inc.         

We grow a lot faster than trees,
so we miss a lot of stuff. - B. Andreas

on 2/6/01 5:34 PM, Scott Johnson (Bellevue) at [EMAIL PROTECTED] wrote:

>> From: JB Parrett [mailto:[EMAIL PROTECTED]]
>> it really messed up one of my forms the other night.
> 
> If the code does math that depends on the ID's being in a specific order,
> here's a trick I use: add code to assert the ID's are the way you want.  For
> example put this in a frmOpen event handler:
> 
>   // digit buttons in a calculator application
>   ASSERT( CalcForm_2Button == CalcForm_1Button + 1 );
>   ASSERT( CalcForm_3Button == CalcForm_1Button + 2 );
>   ASSERT( CalcForm_4Button == CalcForm_1Button + 3 );
>   /* ... etc ... */
> 
> This will at least catch when Constructor toasts the ID values behind your
> back.  Otherwise the magically changing ID's can be hard to track down.
> 
> -slj-
> 


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