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
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Tue Dec 07, 2010 11:46 pm   

[3.32] %pref
 
The %pref function could use a good working over. if you have the preferences window open and happen to have a change made to something through a script, using the %pref function, that change is not reflected in the Preferences window. So later on if you make a change to something in the preferences window, and apply it or click OK and close, the change made through scripting is set back to what it was originally when you opened the preferences window. Some of the preferences don't exactly function correctly either.

An example:
1. Open an untitled session.
2. On the command line type: #makew testwindow Open
3. Right click on the newly created testwindow. verify the option to have a command line is unchecked in Window Options.
4. On the command line of the untitled window type: Testwindow:#show %pref(CommandLine)
Zero was displayed since the window was created without a commandline.
5. On the command line of the untitled window type: Testwindow:#call %pref(CommandLine,1)
6. On the command line of the untitled window type: Testwindow:#show %pref(CommandLine)
One is displayed now since the preference was set but no command line is displayed.
7. Open the package editor and click on the testwindow object, then click on the Advanced tab.
(the command line option is still unchecked here)


This is just one example. I think there are a few more that I have stumbled across but can't recall at the moment. Also just because %pref is considered an advanced function, doesn't mean that what each setting does shouldn't be documented better. I'm not saying each setting needs a description but it wouldn't hurt to have an explanation for some of the less obvious ones.

EDIT: it seems that after a reboot step seven is now showing the command line option checked.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Dec 08, 2010 10:25 pm   
 
%pref is a low-level function that is not intended for normal users. It has no way to update the Preferences window (only the main thread can access the user interface in Windows). So you just need to be aware of that when you use it. Documentation is not planned because the names of items in %pref are tied to internal source-code identifiers and can change in any future release.
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