[etoys-dev] Category not showing up in viewer
Scott Wallace
scott.wallace at squeakland.org
Fri Mar 9 22:42:06 EST 2012
On Mar 9, 2012, at 5:10 PM, karl ramberg wrote:
>
>
> On Sat, Mar 10, 2012 at 12:48 AM, Scott Wallace <scott.wallace at squeakland.org> wrote:
> > Hi
> > I have made the category in morph but it does not show up correctly.
> > The viewer category is showing but not the tiles.
> > I don't understand why I dont see the tiles...
> >
> > Karl
> >
> >
> > additionsToViewerCategoryColorFilters
> > "Answer viewer additions for the 'color filter' category"
> >
> > ^#(colorFilters
> > (
> > (slot hue 'Hue value of my color from -180 to 180' Number readWrite Player getHue Player setHue:)
> > (slot saturation 'Saturation value of my color from 0 to 100' Number readWrite Player getSaturation Player setSaturation:)
> > (slot brightness 'Brightness value of my color from 0 to 100' Number readWrite Player getBrightness Player setBrightness:)
>
> Seemingly has to do with camel-casing.
>
> This works:
>
> additionsToViewerCategoryColorFilters
> "Answer viewer additions for the 'color filter' category"
>
> ^#(#'color filters'
> (
> (slot hue 'Hue value of my color from -180 to 180' Number readWrite Player getHue Player setHue:)
> (slot saturation 'Saturation value of my color from 0 to 100' Number readWrite Player getSaturation Player setSaturation:)
> (slot brightness 'Brightness value of my color from 0 to 100' Number readWrite Player getBrightness Player setBrightness:)
> )
> )
>
>
> Aha, that works for most morphs, but it still don't show up for SketchMorph.
>
> Karl
Right -- since SketchMorphs have no single "color", many of the color-related variables are meaningless for them, and hence are excluded from their viewers. The three variables in your example are among those excluded; if you look in a Sketch's "fill & border" category you'll notice that they're absent there as well.
-- Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120309/5b41e9a9/attachment.html>
More information about the etoys-dev
mailing list