Andre Poenitz wrote:
>> Asger proposed a solution to this. Each dialog could save its
>> 'stateful' variables in files preferences.xforms, preferences.qt
>> etc

> But that's pretty complicated for the dialog author unless this is
> done somehow automatically.

Oh, I'm sure we could automate it, just as we have automated checking 
that the input string is a valid gluelength etc, enabling/disabling 
the 'Apply','Ok' buttons as appropriate:

        addCheckedGlueLength(bcview(),
                             dialog_->input_space,
                             dialog_->input_space);

I'd imagine syntax like

        recorder().add(dialog_->choice_template);

in FormExternal::build, together with

        recorder().getStates();

in FormExternal::update() and

        recorder().setStates();

in FormExternal::apply().

Presumably, recorder() would be the 'FormExternal' view on a singleton 
XformsRecordState class that actually read from and wrote to 
preferences.xforms.

Pretty trivial really.

-- 
Angus

Reply via email to