Re: [Alephmodular-devel] On integrating preferences...
Status: Pre-Alpha
Brought to you by:
brefin
From: Br'fin <br...@ma...> - 2003-12-09 23:05:04
|
On Dec 6, 2003, at 1:28 PM, Br'fin wrote: > I'm thinking of trying to set this up in another way. > > One AM side pref_editor class. On creation, it initializes off the > runtime structures, but has its own copies. On cancel, it does nothing > but free its own memory. On OK it expresses it's values into the > preferences API, calls for a flush of the values to disk, and then > calls for reloading the API values into the runtime ones. > > *ponder* I have got to read up on Model-Controller-View details. > Something in that vein feels like what I'm doing. Though I'm unsure of > my balance... Model: Preferences. Controller: Pref Editor > (Cross-platform), View: GUI (Platform specific) > > -Jeremy Parsons Still mulling over the preferences. But here's some updates and thinking. Looking into MVC type details led me to the Model-View-Controller song performed by Jack Dempsey at the 2003 Apple WWDC. http://www.oreillynet.com/pub/wlg/3533 This may be instructional regardless of what I do with the preferences GUI. I'm trying to balance the gui customization versus what general platform-neutral support I can muster. My current plan is to setup a class to hold all of the runtime preferences. A sibling of this instance will be created and either man-handled or abandoned by the preferences GUI. If the changes are ok'd, then all the info will be dumped into the CPreferences API and flushed to disk. The current code will continue to use the in memory preference structures, but will be given const pointers instead of flexible ones... the values of these preferences can only be changed functionally, direct access to the properties is read-only. This shouldn't be so much of a hassle, and it will help root out the few places in code that do preferences changes while the game is playing (For instance view option changes and volume changes.) After AM is running off new preferences runtime, then I'll try and get the preferences GUI functioning again. -Jeremy Parsons |