|
Zeius Novice
Joined: 02 Nov 2006 Posts: 35 Location: Italy
|
Posted: Mon Jun 25, 2007 7:54 pm
[1.33] buttons strange behaviour |
Hi,i have some buttons with variables on their captions
Most of them are rendered correctly, for example
"AutoSanc @AutoSanc" -> "AutoSanc 1"
other buttons instead does not render
"AutoSanc @AutoSanc" -> "AutoSanc @AutoSanc"
is there something I can check? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jun 25, 2007 8:05 pm |
It's probably a scope issue - try typing @AutoSanc into the script area of the button. On the buttons that are working, it should turn blue and underlined - if you double-click on the variable name it'll take you to the variable. If this is the problem, it won't turn blue in the editor and you know that it's a scope problem - some of your buttons can't see the AutoSanc variable, probably because they're in a window other than the one that contains the variable, or because they're in a package other than the one that contains the variable. There are different solutions depending on which it is, different package or different window.
|
|
|
|
Zeius Novice
Joined: 02 Nov 2006 Posts: 35 Location: Italy
|
Posted: Mon Jun 25, 2007 8:18 pm |
well, it seems that the problem is really that one
the variables are in the parent "folder" and the button seems not to see it...
I could move that variables, but I'm thinking that this "feature" could affect other
situations like aliases...?
and I cannot move all settings using certain variables in the same folder... this would be
really confusing... |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Jun 25, 2007 9:36 pm |
You can explicitly reference the variables using a fully qualified path and that should work.
For example @//MyModule/ParentClass1/Class2/AutoSanc
I may have the syntax slight off but you get the idea. |
|
_________________ Asati di tempari! |
|
|
|
Zeius Novice
Joined: 02 Nov 2006 Posts: 35 Location: Italy
|
Posted: Mon Jun 25, 2007 9:41 pm |
hum...I cannot reference a variable using clear @AutoSanc from anywhere in cMUD?
I hope this is not true, i cant correct all my settings, this is a non-sensed work :( |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jun 25, 2007 9:44 pm |
No, you shouldn't need to change all of your settings. Tech was just suggesting a syntax to try to see if it made any difference. If your variables are in the top-level of the window and the buttons are in the same window, then it should work fine. We need more information about your variable and button setup to be able to help more (like if you are using different packages, modules, windows, etc).
|
|
|
|
|
|