[MCP] [Q] Color change notification
Bill Spight
bspight at pacbell.net
Tue Mar 18 17:43:15 UTC 2003
Dear Ned,
Bill:
> > color: aColor
> > "Change the receiver's color. Directly set the color if
> > appropriate, else go by way of fillStyle. Notify of color change.
> > (To set the color initially, use #defaultColor.)"
> >
> > (aColor isColor or: [aColor isKindOf: InfiniteForm]) ifFalse:[^
> > self fillStyle: aColor].
> > color = aColor ifFalse:
> > [self removeProperty: #fillStyle.
> > color _ aColor.
> > self colorChanged]
> > ^^^^^^^^^^^^
> > (Note also changes to comment.)
> >
> > Calling the new method "colorChanged" is consistent with other
> > usage, such as "layoutChanged".
>
Ned:
> And it would mean that color had been set to either a Color or
> InfiniteForm?
I have no idea why InfiniteForm is considered a color by Morph. Mine is
not to reason why....
> Would there be a similar notification for
> fillStyleChanged?
I don't know whether #fillStyle: should use #changed, as it does now, or
#colorChanged, or #fillStyleChanged.
Best,
Bill
More information about the Squeak-dev
mailing list
|