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
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Feb 05, 2007 6:08 am   

Events firing in disabled folders
 
I have an event located in a folder that is sometimes disabled, sometimes enabled. I would expect that when the folder is disabled that the event would not fire, but it seems the event ignores the status of the folder and fires anyway regardless.

Is this meant to work this way or is this an error?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Feb 05, 2007 6:22 am   
 
Works fine for me. I rclicked the class in the package editor and unchecked enable, and tried #t- and both worked. What method are you using?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Feb 05, 2007 7:24 am   
 
I right-clicked the folder it was contained in and disabled it.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Feb 05, 2007 7:37 am   
 
The only thing I can think of is that there's another event, not in the class, that's doing the same thing, or that there's something here that you're doing that you haven't described. Try duplicating my test - in the untitled session, I created two events, both called test. One echoes "bam", the other "babam" - one is in a class called test and one isn't. They both raise properly when the class is enabled - rclick and disable and the in-class one stops raising for me.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Mon Feb 05, 2007 3:00 pm   
 
Is one of the events in another package or module?
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Feb 05, 2007 3:38 pm   
 
I tried it again and it seems to be working just fine now. How odd.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Feb 05, 2007 4:54 pm   
 
I will mention that I had a lot of program errors before I noticed it malfunctioning and that I restarted the program to test it again. So perhaps the program restart after the errors had something to do with it starting to work again.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Feb 05, 2007 9:24 pm   
 
By "program errors" I assume you mean crashes that brought up the Report Bug dialog? Oftentimes errors that cause that leave memory corruption unless you restart, which can make things go weird.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Feb 05, 2007 10:03 pm   
 
Quote:

I right-clicked the folder it was contained in and disabled it.


I think this is a known bug. Basically what happens is that when you disable a setting in the GUI (I know this applies to classes, but I dunno about anything else) it only disables that setting and not the other settings that are contained in it. #T+ and #T- work correctly, and also cut off access to contained settings, but there's no corresponding icon change for those so it looks identical to what happens when you just use the GUI.
_________________
EDIT: I didn't like my old signature
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Feb 05, 2007 10:57 pm   
 
But it worked just fine when I tried it.

EDIT: But there is something weird going on. Try reproducing this one:

1)Open the untitled session.
2)Open the package editor.
3)Select New... class and name it test.
4)Select New... event and name it blah, give it a #say script.
5)Select New... event and name it blah again, give it a different #say.
6)Click on the window item to change the current class.
7)Select New... event and name it blah, give it a third #say.
8)Now - and this is the important bit - drag the second event out of the class folder and into the window, so it's in with the third event.
9)On the command line, type #raise blah - all three messages should appear.
10)Now rclick the class test and click Enabled to disable it.
11)Now hit enter on the command line to reraise the event.

I only get the third #say appearing.


Last edited by Fang Xianfu on Mon Feb 05, 2007 11:03 pm; edited 1 time in total
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Feb 05, 2007 11:01 pm   
 
Quote:
it only disables that setting and not the other settings that are contained in it

That's technically true, but whenever CMUD looks for a setting (alias, variable, trigger, etc) it calls a function to see if the setting is "InScope" and this function checks to see if the setting itself is enabled, *AND* checks all of the parent classes to see if they are enabled too.

The GUI only changes the color of the setting if the setting *itself* is disabled, not if the parent class is disabled. This is normal and there isn't any bug about this that I'm aware of.

So, I'm not sure what "known bug" Matt is refering to.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Feb 05, 2007 11:04 pm   
 
See above edit please Zugg, I added some more info on what could be this problem, or another.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Feb 05, 2007 11:59 pm   
 
Quote:

The GUI only changes the color of the setting if the setting *itself* is disabled, not if the parent class is disabled. This is normal and there isn't any bug about this that I'm aware of.


Right. I must've been noticing the issue with buttons. Using the GUI to disable the class a button is contained in does not modify the button; using #T+ or #T- does.
_________________
EDIT: I didn't like my old signature
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Tue Feb 06, 2007 1:07 am   
 
It seems like it was probably due to the mapper crashes as I had quite a few of those bug reports pop up and when I restarted the program I couldn't reproduce it.
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Wed Feb 07, 2007 8:21 pm   
 
I have had a lot of problems with disabled folders. Seems when you copy a setting from a folder (or class or whatever) it is ignored somehow. So often CMUD creates a new variable for instance instead of using the existing one.

I find it very confusing that disabling a folder doesn't disable the children settings. Not very intuitive Zugg...

And it would be nice to be able to disable a lot of settings by just disabling the parent. By the way, am I the only one who hates how easy it is to disable/enable settings? I'd prefer right-clicking or something - I do it accidentally all the time.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Thu Feb 08, 2007 12:24 pm   
 
I'd wager that events firing inside of disabled class folders is a bug that will be fixed. It's intuitive when it works properly.

There are a few different ways to disable settings. You can right-click the class folder or other item and disable it from the context menu, if you like. Why not?
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Thu Feb 08, 2007 3:40 pm   
 
I had created mine by copying an existing similar folder over. That could be it.
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