|
frasten Beginner
Joined: 06 Jan 2006 Posts: 24
|
Posted: Tue Jan 08, 2008 7:09 pm
[2.18] Disabled Prompt Variables |
If I set some variables in Options -> Session -> Prompt, CMUD will create these variables. Ok.
But if I disable those variables in the Package Editor, CMUD will duplicate those variables for each line of prompt received!
So, after some time, you cold have thousands of these variables :-) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jan 08, 2008 7:32 pm |
Well, I'm not sure what else you expect CMUD to do. If the variables are disabled, then CMUD doesn't see them. So when it received your prompt, it creates the variables just as you told it too. You really shouldn't be disabling those variables if you are using the automatic Prompt feature.
|
|
|
|
frasten Beginner
Joined: 06 Jan 2006 Posts: 24
|
Posted: Tue Jan 08, 2008 7:52 pm |
That's ok. But should it be a correct behaviour?
I agree that what CMUD does now has got a sense, but this could bring to memory leaks...
Maybe it could update the variable's value, leaving it disabled. Or simply do nothing, if the variabile is disabled.
Thank you for your reply |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Tue Jan 08, 2008 8:25 pm |
If there is one set that's disabled and another set that isn't, shouldn't it update the set that isn't rather than creating yet another set of variables?
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jan 08, 2008 9:42 pm |
Well yes, if there is a set that is still enabled that it should be updating that set. But I got the impression from the original poster that they had some sort of script that kept disabling the variables. If the variable is enabled and it's not getting updated, then let me know because that's definitely a problem.
Edited: Although I can certainly see where having duplicate variables of the same name will really confuse CMUD. The CMUD hash table can only point to a single variable with a given name, so if a duplicate gets set, I don't know what will happen. Again, this is pretty minor...I can't think of why you'd ever want to disable your prompt variables in the first place. |
|
|
|
|
|