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
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Aug 03, 2007 10:28 am   

[1.34] Status Window does nto always update
 
I think was reported before and it certainly has improved, but not fixed completely.

I have StatusWindow set to display a specific variable, that I update when I the StatusWindow display changed.

This works perfectly when I update the variable with a TRIGGER. However when i run the exact code with an EVENT, the variable is updated, but the status window is not.
If I manually change the StatusWindow or the Variable in question, the StatusWindow displays the variable as expected.

I'm not sure if it makes a difference but my EVENT is in a separate package from my StatusWindow.

A similar problem is mentioned at the end of this thread.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Aug 06, 2007 5:56 pm   
 
Does it work if the event is in the same package? Are you sure the event is updating the correct variable value? Give us some more explicit code that we can test so that I can look into this.

The status window update is handled in CMUD at a pretty low level: when the status item is created, it has a backreference to the variables that it contains. When one of those variables changes it's value, the status window is item is updated. So it shouldn't matter whether it's done from an Event or a Trigger...the variable has no way to know what changed it.

My guess is that it's more because the trigger is executing in the context of the window that received the text, while the event is operating in the context of the other package. So maybe it doesn't update the status item because it's not in the same package? Let me know what happens if the event is in the same package (but different module), or if it's in the same window as the status item.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Aug 10, 2007 8:53 am   
 
Ok, I've got an update on this. Took a while since the status window can get "stuck" in not updating.

I recreated the scenario in a blank session and it worked perfectly. This was when the Event and the StatusWindow were in the same module.

If I moved the EVENT to the a different module, in the same package it still worked.

If I moved the EVENT to a different module in a different package then the update of the StatusWindow does not occur. Furthermore, even if I move the event back to a different module in the same package the StatusWindow will now update unless I update the StatusWindow directly. This behavior is persistent.

Oddly enough updating the variable with an Alarm doesn't cause the StatusWindow to Display, but updating it with a trigger (I tested with Command Input) does.

I hope that helps you to track that down. It was a nasty one to clarify but hopefully an easy one to fix. I have a few scripts for MXP driven StatusWindow (i.e. clickable) that depend on this. I could go back to triggers but event's are a cleaner more extensible way to handle it.
_________________
Asati di tempari!
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