Stencil, Forms

subbukk subbukk at gmail.com
Sat May 19 11:07:51 UTC 2007


On Saturday 19 May 2007 3:07 pm, Frédéric Ferrère wrote:
> Hello, all-
>
> first, i apologize about my english :)
>
> I've played with forms and stencils and an error occured in the
> following piece of code :
>
> (ImageMorph new image contentsOfArea: (Rectangle origin: 0 at 0 extent:
> 10 at 10)) stencil
>
> evaluate this code and the following error occurs :
>
> "Error : Instances of UndefinedObject are not indexable"
stencil needs a form with a color table. contentsOfArea does not copy over 
color maps automatically (see comment in ColorForms). Hence the error.

Try:
ImageMorph new explore
and
(ImageMorph new contentsOfArea: (0 at 0 extent: 10 at 10)) explore
to see the difference.

Hope this helps .. Subbu



More information about the Squeak-dev mailing list