I'm looking for input from the people interested in Dabo about how to design the system for handling preferences. I see several uses off the top of my head:

1) Internal usage: remembering window positions, last query values, etc.

2) App-level usage. You may want to track things like usage patterns, and have your app update based on those patterns.

3) User-level settings. Users can set things the way they like them (font sizes, simple/complex interfaces, etc.)

Right now we have a couple of basic calls (dApp.getUserSetting(), dApp.setUserSetting()) that seem to do the job; I haven't decided if we should keep the same interface, or update it to something different. One option is to create a series of pref classes which you can hook together with a standard object dot notation. Something like:

pref = dabo.dPreference()
pref.rootValue = 8
pref.subSystem.title = "Fred"
pref.subSystem.mainWindow.Top = 100

...etc., so that by simply referencing the objects, the desired hierarchies are dynamically created. You can then reference the property value by just using it; if the pref hasn't been defined, you get None instead of an error, or possibly a default. Like I said, I'm just tossing these ideas around, and haven't decided on any particular approach. Any and all comments, opinions, insights and suggestions would be welcome!

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to