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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Jun 20, 2009 9:48 pm   

[30XB] Problems with secondary window buttons
 
When I want buttons attached to a secondary window I place them in a class folder and attach the folder to the window so that I can manipulate their visibility by using #T+/- on the class.
However, what I've found is that this only works as long as an error doesn't occur within said window. Once an error occurs (a script failure, for instance), the buttons disappear and their visibility cannot be restored via script. Manually disabling and enabling the class does restore visibility, though.
Here is the code snippet that acts on the button class.
Code:

....
#EXECWIN windowname {
  #T- buttonclassname
  #T+ buttonclassname
....
  }

Either the above code is not the way to do it or there is a bug. Please advise.
_________________
Sic itur ad astra.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sun Jun 21, 2009 11:59 am   
 
Why are you following a #T- command immediately with a #T+? Is that just part of your example? Either way it doesn't make a great deal of sense. I don't have CMUD handy to test right now but if I recall, you shouldn't need the execwin either - so long as the class has a unique name it should enable and disable just fine from whatever module you choose.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sun Jun 21, 2009 8:22 pm   
 
I have no idea why it doesn't make sense to you. However, if you manually disable and enable a button (or a class containing buttons) it will force the buttons to become visible again. Which is the point. The code shown above exactly mimics the manual action. Since the buttons shouldn't disappear to begin with, that is the main issue with the post. I have resorted to the above script because the buttons do disappear. That is stated in the post. I use #EXECWIN because I can guarantee the execution context (i.e that the script will be executed under the target window) that way. Not using #EXECWIN runs the danger that CMUD will look in the window executing the script for the button class which in this case is attached to the secondary window(as stated in the post). I have incurred context errors in the past (perhaps a CMUD bug) and doing it this way has solved the (context) problem. Again, the main point of my post is/was the the buttons disappear.
_________________
Sic itur ad astra.
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Jun 22, 2009 4:59 pm   
 
You'll need to post your exact button XML code that is in the shared package and then post a procedure for causing one of these errors that you mentioned. I played with this for a while and couldn't get it to fail.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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