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


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

PostPosted: Tue Jun 10, 2008 5:12 am   

[2.26] Writing back of modified DB variable not done in certain button case
 
Sorry to have to post on this again, but I'm seeing that on 2.26 the non-writeback of modified DB vars is rearing its ugly head again.

If I have a DB var displayed through a button and updated via a trigger then the change to the variable is not saved when I exit Cmud. This is related to previous issues I've had with this in the past (and which are now fixed) and might have been caused by the very recent fix (2.26: Fixed problem with setting a variable to %null not updating related settings, such as buttons).

Procedure:

Code:

1) Copy and import the snippet of code below into a clean session opened off-line.
2) Type "#echo test".  This will cause the trigger to fire and you should see the button update from 1 to 100.
3) Exit Cmud with a left-click to the red box in the upper-right hand corner of the program.
4) Enter Cmud again and confirm that the value changed back to 1 indicating that the change to 100 was not saved.


Code:

<class name="test" id="4">
  <var name="test" type="Record" id="1">two=2|one=1</var>
  <trigger priority="20" case="true" regex="true" id="2">
    <pattern>^test</pattern>
    <value>#addkey test one 100</value>
  </trigger>
  <button autosize="false" width="100" priority="30" id="3">
    <caption>%db(@test, one)</caption>
  </button>
</class>


Incidentally this is only happening when I display this through a button. When I was producing the procedure this would only happen if a button was present displaying the value. Strange.


Last edited by ReedN on Tue Jun 10, 2008 11:14 am; edited 1 time in total
Reply with quote
ReedN
Wizard


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

PostPosted: Tue Jun 10, 2008 5:21 am   
 
On the bright side I'm starting to get really fast as creating these procedures to pin-point the errors. :)
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Jun 10, 2008 10:32 am   
 
Confirmed. C'est bizare!

Also, I assume you mean left-clicking the red x, because rclicking it doesn't do anything.
_________________
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: Tue Jun 10, 2008 11:17 am   
 
Yes, quite so, left-click not right!

Also, I believe this affects string list variables as well as I'm seeing this behavior on a string list displayed on a button as well.
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jun 11, 2008 12:43 am   
 
Confirmed and added to bug list. As you mentioned, I suspect this is a side effect of the %null caption "fix". Bug fixes always seem to have annoying side effect these days...very frustrating.
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jun 11, 2008 9:48 pm   
 
There were actually 2 bugs causing this. First, there was a rather serious bug new to 2.26 that was preventing settings from saving sometimes when using the X button to close CMUD. Next, there was a more obscure bug with the database variable caching again that was causing this specific problem. Thanks for the report...maybe someday all of these bugs will finally be fixed.

I swear that it seems 90% of the bugs are related to caching issues for speed performance. At least I'm one of the few remaining programmers who actually still cares about performance and efficiency ;)
Reply with quote
ReedN
Wizard


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

PostPosted: Wed Jun 11, 2008 11:18 pm   
 
Thanks for persevering with the bug fixes.

By the way, does this affect string variables as well? I saw some evidence it was affecting them too, but I focused on the db variables in my example for simplicity.
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jun 11, 2008 11:37 pm   
 
Yes. The first bug was a general serious problem that could prevent *any* changes to any setting from being saved. For example, I even had a case where I created a new window, then exited and restarted CMUD and my new window wasn't saved.
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