Preferences Panel enhancements

Scott Wallace scott.wallace at squeakland.org
Fri Jul 23 04:56:41 UTC 2004


Hi, Brad,

You can maintain arbitrary (i.e. not necessarily boolean) parameter 
information in the "Parameters" dictionary maintained by Preferences. 
You can see and change all Parameter settings by hitting the "Edit 
Parameters" button on the Preference Panel's search page; you can 
also add new Parameters there, though typically this is instead done 
via retrieval-with-lazy-defaulting code of the form:

Preferences parameterAt: <someParameterName> ifAbsentPut: [<some 
default value>]

Once you have such a parameter defined, just use the Parameters 
inspector to view and edit its value.  Eventually, if need be (e.g. 
for non-Squeak-dev users,) it's a simple matter to build a little 
control (e.g. a slider) whose manipulable numeric "value" is bound to 
the value of the parameter, thus providing a more customized 
user-interface for setting the parameter.

Enhancements to the Preferences tool along the lines you suggest are 
long overdue.  But meanwhile, perhaps the above will be helpful for 
your immediate needs.

Cheers,

  -- Scott

   At 7:29 PM -0700 7/22/04, Brad Fuller wrote:
>Has there been any thought to enhancing the Preferences Panel so 
>that one can register preferences using other types of UI other than 
>the binary checkboxes (i.e. addPreference:) provided?
>The "Halos" category has radio buttons and a button, but this 
>capability is added by including a hardcoded test for the category 
>in Preferences>>intializePreferencePanel and building the interface 
>that way.
>
>It would be nice since not all preferences are binary. For instance, 
>I'd like to add settings to set sample rate for a series of uses -- 
>or even as simple as a stereo/mono radio button selection.
>
>brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040722/b5406bf9/attachment.htm


More information about the Squeak-dev mailing list