<!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 &quot;Parameters&quot; dictionary
maintained by Preferences.&nbsp; You can see and change all Parameter
settings by hitting the &quot;Edit Parameters&quot; 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: &lt;someParameterName&gt; ifAbsentPut:
[&lt;some default value&gt;]</div>
<div><br></div>
<div>Once you have such a parameter defined, just use the Parameters
inspector to view and edit its value.&nbsp; 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 &quot;value&quot;
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.&nbsp; But meanwhile, perhaps the above will be
helpful for your immediate needs.</div>
<div><br></div>
<div>Cheers,</div>
<div><br></div>
<div>&nbsp;-- Scott</div>
<div><br></div>
<div>&nbsp; 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 &quot;Halos&quot;
category&nbsp;has radio buttons and a button, but this capability is
added&nbsp;by including a hardcoded test for the category in
Preferences&gt;&gt;intializePreferencePanel and building the interface
that way.</font></blockquote>
<blockquote type="cite" cite>&nbsp;</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>&nbsp;</blockquote>
<blockquote type="cite" cite><font
face="Arial">brad</font></blockquote>
<div><br></div>
</body>
</html>