PDA

View Full Version : bug in ctlstate() - can't initialize control in declaration



GregMalick
10-09-2004, 06:22 PM
I just noticed this bug in ctlstate.
throw this code in a non-modal panel:

...
xx = ctlstate("E",true,20,"xx_UDF");
...

// dummy UDF
xx_UDF: a { info(a); }
You'll notice that when the panel is displayed that the ctlstate button is not initialized to ON.

Dontcha love having to type parameters that get ignored. ;)

faulknermano
10-10-2004, 02:20 AM
Dontcha love having to type parameters that get ignored. ;)

oh i adore them. :D


this is a "known bug", at least known by those in the mailing list. :D

workaround: just after you create the control, use setvalue() immediately after to "initialise" your control.

GregMalick
10-10-2004, 04:20 AM
Yep, I'm already onto the workaround. Just love the extra code. Yum! :p