-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi there,
I've noticed that buttons which are the target of an autodisable attribute inconsistently report a 'disabled' state after being enabled as a result of the execution of the automatic disabling-enabling if they were initially disabled:
<vbox> <button id="a" label="a - Initially disabled" disabled="true" onClick='alert( "Klikk!" )' /> <button id="b" label="b- Klikk" autodisable="self,a" /> <button label="Is 'a' actually disabled?" onClick='alert("" + a.isDisabled() )' /> </vbox>
After clicking on button 'b', 'a' will be no longer disabled. It will however report being so when questioned via the isDisabled() method.
I'm not sure whether this is done so on purpose or it's a bug. I would anyway like to point out that the autodisable feature, great as it is per se, loses much of its convenience if if fails to restitute the temporarily disabled buttons into their original state.
With kind regards
César Varona
Hi,
I've slightly modified your code and it works as expected:
<vbox> <button id="a" label="a - Initially disabled" disabled="true" autodisable="true" onClick='alert( "Klikk!" )' /> <button id="b" label="b- Klikk" autodisable="true" onClick='alert( "Klikk!" )' /> <button label="Is 'a' actually disabled?" onClick='alert("" + a.isDisabled() )' /> </vbox>
Or did I miss something?
Cheers, Maik
Well, with your modification the 'a' button actually works as expected, but the 'autodisable' feature does not work at all (it's not a boolean value that must be specified but the ids of the components to be automatically disabled upon click).
With kind regards
César Varona
Yes, you're right, good to learn something new from a mistake...:-)
Asked: 2011-04-28 10:29:45 +0800
Seen: 228 times
Last updated: Apr 29 '11