How to commit prefs before the user presses "Apply"?

Dave Peticolas peticola@krondo.com
Fri, 04 Aug 2000 09:26:16 -0700


Kevin Finn writes:
> 
>       Is there a way to force the setting of an option right away?  I suppose
> could add a flag to the generic options structure that would make it call the
> setter right away, but I'm hesitant to make such a large change to the option
> structure if there's an easier way.
> 

There isn't an easier way, but I think this needs to be done in a slightly
different way. We can't change the option value until the user hits 'Ok'
or 'Apply' under any circumstances -- that violates the semantics of the
dialog.

So, I think options need a new callback that is invoked whenever the
GUI implementation of the option is changed by the user. The callback
would be invoked with the new value as an argument. Would you like to
work on this?

dave