Re: Prefs

On Wed, 12 Mar 2003, Cyrille Chepelov wrote:
default attributes are handled as normal objects, and the defaults
backing store is a diagram (IIRC).

Maybe defining a special "Preferences" object type, with dummy
draw/click/stuff methods, and properties for each of the preferences
would do the trick. The user wants to see the preferences? No problem, we
fire up that object's properties (and then copy the values into the
static area, if we continue to find this more convenient to
access). Persistence would be handled by saving a diagram.

Bonus, it should be possible to save diagram-specific preferences by
saving an instance of that object onto a hidden layer (the only detail to
solve is that we wouldn't be accessing the static area anymore, but the
diagram's preferences object or the fallback global preferences
object. Hummm, how to choose between per-diagram or global prefs, this is
interesting (both on code & GUI aspects).

'fcourse, we'll need a way to upgrade existing diarc files.

Actually, I wasn't thinking of using it that way, but it may be workable.
I was just thinking of using the prop/offsets system to work directly on
the prefs, without having a pseudoobject holding them.  We can still fire
up a dialog easily, but don't need to hack in hidden layers or dummy
methods.  And we can keep the current save/load system, no need to upgrade.

I was thinking for a split second of having a diagram be a Dia Object,
where the global prefs are the defaults.  But it's more a question of the
view than the diagram... what happens if there's more than one view?  Do we
save all of them, so that they're opened automatically when the diagram is
opened?  There's also some (few, so far) prefs that are not


Lars Clausen (| HÃrdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]