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


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Fri Mar 23, 2007 10:00 pm   

[1.26] Settings leaking between packages/windows
 
create new session
name: test
host: test
port: 23

Save and close. Open 'test' offline.

settings. file -> new package.
named 'comms'.
change from global to local
convert to window

select 'no network connection'
uncheck 'command line'
check 'window is visible'

leave 'default window position' as tabbed, relative to <blank>

save changes

cmud flickers for a second and sorts itself out as having a 'tells' and 'comms' window open

check everything is working by typing ':comms: test123'. works fine

close cmud, reopen cmud

open 'test' offline

'test' now has no network connection and no command line. for some reason it's copied settings from 'comms'
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Apr 10, 2007 6:39 pm   
 
Well, I figured out what is causing this. I'm just not sure how to fix it yet.

Packages form a chain of "inheritance". When you created the "comms" package, it got added to the list of packages loaded for your session. Your packages get loaded in the order listed in the Files tab, with the primary package (test.pkg in this case) loaded last. Each package inherits the settings from the previous package.

So, when you turned off the command line setting in "comms", this got inherited when "test" was loaded, causing the "test" window to no longer have a command line either.

This is done so that you can create your own "defaults" package which can change the default settings inherited by your main package. For example, you can create the "comms" package and then change all of the default colors, and these changes will be inherited and used by your main package.

So, this is really an important feature, but in this case it is causing problems. Obviously there are some settings that should *not* be inherited (like whether there is a command line in a window). But I'd hate to add a flag to every preference to determine if it can be inherited or not. So I need to think about this problem a bit more to decide how best to fix it.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Apr 10, 2007 6:50 pm   
 
Why not make one master check to say If package is Default inherit.
Then do not inherit for any of the others?
Then add a radio tick box somewhere for us to choose the Default package?
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Apr 10, 2007 6:59 pm   
 
I hate to add even more confusing options like that. People are having enough trouble with packages as they stand.

But I think I figured out an obvious solution to this...It should only inherited preferences from *modules* and not *windows*. A window is supposed to be local to itself. It doesn't make any sense to have your "test" window inherit settings from the "comm" window.

If "comm" was a *module*, then it would make sense to inherit preferences from it. If you want to change the default colors, you can set them for a *module* just like if you wanted to create inherited aliases or triggers.

So, I changed it so that any *windows* created in the loaded packages do not put themselves into the inherited chain. This seems to work well and fixes the problem that you reported.
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Tue Apr 10, 2007 11:54 pm   
 
Zugg wrote:
If you want to change the default colors, you can set them for a *module* just like if you wanted to create inherited aliases or triggers.

This won't apply for the fonts though will it?
_________________
Taz :)
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Apr 11, 2007 1:01 am   
 
Sure it would. If you create a new module in a new package and then go into the Preferences and change the Output window font for that specific module, then any window loaded after that module will inherit the new font setting.

The only thing this won't apply to is the new Style stuff. The global styles for the syntax highlighting come from an INI file (styles.ini) rather than from the packages. But the Output window font isn't yet set by styles yet since this requires a "local" style stored in the PKG file, which is what I haven't implemented yet. The new global styles only replace the previous global fonts that were stored in the cmud.ini file.

But the intent is to allows allow you to inherit the Output window font from your own "defaults" package.
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