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
tehpopa
Newbie


Joined: 01 Jun 2011
Posts: 4

PostPosted: Mon Apr 09, 2012 10:53 pm   

Send commands to main window?
 
I've got a secondary window that I use to monitor my stats. Now I'm looking to add some toggle buttons to this window to do some other tasks(send commands to the mud, enable/disable triggers or classes). I've come to an issue I couldn't find a solution to. When I do something like:

Code:
#execwin MainWindowNameHere { #whatever }


the command doesn't go through to the main window. Is this not supported? Is there a workaround?

Also, if I want to have a button in this second window enable/disable a trigger or class in another window, how do I reference that trigger or class? Is it //MainWindow/Triggers/ExampleTrigger like with variables? Or is it not possible?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Apr 09, 2012 11:34 pm   
 
Only variables are visible from outside the window, I believe (if not, yes, they would be referred to in the same way).
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Apr 10, 2012 12:06 am   
 
I think another option is to use events. I think that a raised event can be seen by all windows.
Reply with quote
tehpopa
Newbie


Joined: 01 Jun 2011
Posts: 4

PostPosted: Tue Apr 10, 2012 2:44 am   
 
Rahab wrote:
I think another option is to use events. I think that a raised event can be seen by all windows.


I just tried that but it seems to be a no go. Thanks though.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Apr 10, 2012 4:25 am   
 
#RAISE is affected by context. If the #RAISE occurs in a window that has no visibility towards a particular package, then events in that package will not be aware that #RAISE was called and therefore will not fire.

Tehpopa, give us some real code to look at. #EXECWIN is in fact a way to use zscript commands in other windows, but there might be focus/context issues (used to be a bug wherein #execwin wasn't working correctly with window context, but I can't remember if that got fixed).
_________________
EDIT: I didn't like my old signature
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