|
ArjenJ Wanderer
Joined: 30 Jan 2006 Posts: 66
|
Posted: Thu Dec 21, 2006 9:18 pm
Disabling class |
hmmm somehow the "#t- classname" doesn't seem to work. The class turns grey in the package editor but the triggers in the specific class are still firing. Any idea's if I might be doing something wrong?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Dec 22, 2006 6:48 pm |
To test this, I created a trigger roughly like this in a class "Test":
#trig {This is a test trigger} {#echo Fired;#T- Test}
and then #echoed the pattern twice from the command line. Worked as expected.
What exactly are you doing? |
|
|
|
steveh_131 Newbie
Joined: 25 Dec 2006 Posts: 4
|
Posted: Tue Dec 26, 2006 3:50 pm |
I have encountered the same problem, just not with triggers. The triggers seem to be disabled properly, but the buttons in the class are still visible when the class is disabled!
I don't know if this is a bug or if it is just different functionality than zmud. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Dec 26, 2006 7:26 pm |
There was a bug with button display and colours not being updated instantly when things changed the settings- was that ever fixed? That problem's a symptom of that bug, I think.
|
|
|
|
Morgal Beginner
Joined: 06 Nov 2006 Posts: 26
|
Posted: Wed Dec 27, 2006 3:21 am |
Having read this, it could explain some VERY weird behaviour i was experiencing.
I have a trigger that turns a class off, but there was a trigger in that class firing even though the class was greyed out.
I considered lots of possibilities, such as there was another trigger turning the class on (But a find brought up nothing at all), and other things but in the end i couldnt figure it out, so i just changed the way my script worked, and now i have no problems.
So.. i guess im saying there is SOMETHING in this bug report, although i wouldnt say it was a common thing, as i turn classes on and off all time but it did happen.
Morgal |
|
|
|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Wed Dec 27, 2006 5:21 am |
I have no idea what the problem is with #t- for use on classes, however I can suggest as a workaround until it is fixed, you should be able to use #class classname 0 or #class classname 1 to turn classes on and off...
|
|
|
|
crycry Apprentice
Joined: 24 Jun 2006 Posts: 169 Location: UK - South Coast
|
Posted: Wed Dec 27, 2006 3:32 pm |
ive always used #class just as Jed, with no problems.
|
|
_________________ 'Life is what happens, when your too busy doing something else'
_________________
XP Pro SP2
cMud 1.24
_________________ |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri Jan 12, 2007 3:29 am |
crycry wrote: |
ive always used #class just as Jed, with no problems. |
Actually I am having the same problem. I am using #class to disable the class and enable it. However, I have triggers firing in the disabled class and that shouldn't happen. |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Fri Jan 12, 2007 3:24 pm |
My specific problem with disabling a class was caused because I had multiple classes with the same name, though they were in different packages. I expected that the "#T- Update" code in package one would disable the class in package one, when it actually disabled the Update class in package two instead. Renaming the classes to have completely unique names solved my problem, though I don't know if this is the exact problem any of you are having.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Jan 12, 2007 6:04 pm |
The button issues listed above were fixed. There are others but they are so obscure there wasn't a point complaining at that time.
I have a class that is specifically there so I can make a bank of buttons appear and disappear when I toggle a button and that setup uses #T+/#T-. It is working fine.
As was mentioned above if there are multiple classes with the same name the wrong one could end up being disabled/enabled.
Another thing that may be happening is if you renamed a class after creating it. There is a chance that they are behaving like a variable and the new name is completely ignored by internal commands!! A good test for this idea would be to create a new class and move your triggers etc into it. Except that moved sub-states are disappearing . You could create a class and some bogus triggers and test it that way though... |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
|
|