[REBOL] Re: VID: clear-fields - how to improve it
From: greggirwin:mindspring at: 27-Mar-2003 18:40
Hi Ashley,
AT> How about a clear-faces function that supports:
AT> clear-faces/all
AT> clear-faces/field
AT> clear-faces/area
AT> clear-faces/field/label/text-list
AT> clear-faces/mystyle
AT> clear-faces/my-style
AT> clear-faces/my-date-style/default now/date
AT> etc
AT> The ability to clear by user-named styles would enable the VID designer to
AT> control the granuality of the operation while keeping the function itself
AT> as generic as possible.
AT> The /default refinement would provide a handy means of assigning a value to
AT> a style.
The trouble with this, in my view, is that you end up with either a
huge list of refinements - and the code to support them - or a number
of calls to the function to clear a particular subset of styles,
thereby losing the beneift of it. Plus, how do to tell it what facet
to change in each style (e.g. check/data vs. field/text)?
There are 3 attributes to contend with: STYLE, FACET, and DATA. A
catch with the DATA part of the equation is whether to distinguish
between mutable and immutable values (e.g. CLEARing series values
rather than setting them to NONE).
-- Gregg