Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Aug 30, 2008 5:40 pm   

[CMUD 2.36]? disabled trigger firing
 
I decided to rewrite some of my scripts so I created a new package. Though the class names are different the trigger id and the trigger pattern are the same now. I disabled the class containing the trigger in the main package. The trigger itself is normally disabled and only enabled when needed.
Additionally, all the routines in the new package/class have the same name as in the main package. That is, the two classes are exactly the same except for the class name and the fact that the main package class is disabled.
When I invoked the script that enables the trigger (which originally had a different pattern in the main package, but again, the same id) I found that the trigger in the disabled class in the main package was firing, not the one in the new package. Proof of this was that the trigger was now enabled in the disabled class. When the trigger completes its task, it invokes an alias which disables it. The aliases have the same name in both main and new package. The alias in the new package was invoked and "disabled" the trigger in its class, thus leaving the trigger in the main package enabled.
Now, I could understand this happening if the main package class was enabled, but I was under the impression that disabling a class made it, and its contents, invisible to the scripts.
The curious thing is that, as I mentioned before, they two triggers had different patterns, which adds proof that the disabled class trigger was firing since that was the code that was executed because the new package trigger was defective. Also, when I removed the new package, I found that the new trigger messages were appearing instead of the trigger in the (now enabled) main package class. This could be explained by the fact that there is an overlap because of the compiled code. However, I would have expected that removing the package would also remove all traces of its existence.
_________________
Sic itur ad astra.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net