<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: Preferences Panel
enhancements</title></head><body>
<div>Hi, Brad,</div>
<div><br></div>
<div>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:</div>
<div><br></div>
<div>Preferences parameterAt: <someParameterName> ifAbsentPut:
[<some default value>]</div>
<div><br></div>
<div>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.</div>
<div><br></div>
<div>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.</div>
<div><br></div>
<div>Cheers,</div>
<div><br></div>
<div> -- Scott</div>
<div><br></div>
<div> At 7:29 PM -0700 7/22/04, Brad Fuller wrote:</div>
<blockquote type="cite" cite><font face="Arial">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?</font></blockquote>
<blockquote type="cite" cite><font face="Arial">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.</font></blockquote>
<blockquote type="cite" cite> </blockquote>
<blockquote type="cite" cite><font face="Arial">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.</font></blockquote>
<blockquote type="cite" cite> </blockquote>
<blockquote type="cite" cite><font
face="Arial">brad</font></blockquote>
<div><br></div>
</body>
</html>