 |
yelayon Novice
Joined: 15 Mar 2005 Posts: 42
|
Posted: Tue Jun 16, 2009 9:13 pm
[Fixed in 3.10][3.08]/[3.09] Toggle button in enabled/disable classes |
Hi,
I have few buttons in class that I enable/disable to show/hide set of buttons (switches for my mud).
Button's variable is of course outside that class (always in scripts scope).
Code: |
<button type="Toggle" variable="isSeqTransferON" autosize="false" width="83" height="18" autopos="false" left="-266" toolbar="4" color="black" textcolor="green" priority="168" id="3957">
<caption>SeqTransf OFF</caption>
<button color="black" textcolor="red" id="3958">
<caption>SeqTransf ON</caption>
</button>
</button> |
BUG description:
1. isSeqTransferON variable has value 1 - so button is in state 1 -> pushed and has red-text and caption "SeqTransf ON".
2. Disable class which include that button
3. Enable class
4. Button is in state 1 still, but it is showed like "unpushed" and caption is "SeqTransf ON" but green color (which is defined for state 0)
(button should be pushed and red-text color for caption)
Rgds,
W. |
|
Last edited by yelayon on Tue Jul 28, 2009 11:36 am; edited 2 times in total |
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Jun 17, 2009 3:21 am |
Confirmed.
Another oddity, for a long while I couldn't even see the button and had to manually re-created. Because you specification (I'm sure the negative number in toolbar 4 has something to do with it) it didn't even show on screen. Manipulating the top/down/left/right well eventually get you to a visible combination. |
|
_________________ Asati di tempari! |
|
|
 |
yelayon Novice
Joined: 15 Mar 2005 Posts: 42
|
Posted: Wed Jun 17, 2009 8:32 am |
It is not negative. I have position set to:
- align: right / top
- left: 265
- top: 1
- toolbar: 4
So negative numer in XML description is probably b/s right alignment. |
|
_________________ Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jun 17, 2009 3:14 pm |
Confirmed and added to bug list. Re-enabling the class causes the button to be displayed in it's zero-state mode instead of it's current state.
And yes, if you have the Align set to "right", then the XML stores the Left value as negative, which means 265 pixels from the right edge. So if Tech's screen was less than 265 pixels wide, then the button would be hidden off the left edge. |
|
|
 |
yelayon Novice
Joined: 15 Mar 2005 Posts: 42
|
Posted: Wed Jun 17, 2009 4:37 pm |
INFO - workaround until bug will be fixed (for toggle type buttons, which has defined variable)
Code: |
;enabling class
#CLASS GSModesButtons 1
;wait 1ms ... is stupid but.... required to work
#WAIT 1
;we need to change variable - cannot assign the same value, so we double negate value
#VARIABLE isAtomBeamON !@isAtomBeamON
#VARIABLE isAtomBeamON !@isAtomBeamON |
and the buttons shows proper state - in real we twice toggled state (toggle buttons has only 2 states - 0 and 1)
Also tried #UPDATE, but it doesnt work |
|
_________________ Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. |
|
|
 |
yelayon Novice
Joined: 15 Mar 2005 Posts: 42
|
Posted: Mon Jul 20, 2009 9:35 am |
Still exists in cMud 3.09
|
|
_________________ Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jul 20, 2009 5:20 pm |
Yes, this bug is still on my bug list.
|
|
|
 |
yelayon Novice
Joined: 15 Mar 2005 Posts: 42
|
Posted: Tue Jul 28, 2009 11:37 am |
Fixed in 3.10
|
|
_________________ Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. |
|
|
 |
|
|