[Cuis-dev] change image in ImageMorph

Hernán Wilkinson hernan.wilkinson at 10pines.com
Sat Jun 1 20:25:17 PDT 2024


Just a small comment. In Smalltalk we do not talk about statements but
about messages.
Everything is done sending messages to objects, and if the object knows how
to answer that message, it does it evaluating the related method.
At the end they are all bits and bytes, bit conceptually it is not the
same, and understanding how objects collaborate sending messages is
essential to understand the core of Smalltalk

Cheers!
Hernan


*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina


On Sun, 2 Jun 2024 at 00:16 Ezequiel Birman via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> There is an example in ImageMorph's comment. You can also look at the
> implementation of ImageMorph >> readFromFile. It prompts for a file name
> and then does what you are asking for:
>
>> ... self image: (Form fromFileNamed: fileName)
>
>
> So the statement could be:
>
>> myImage := Form fromFileNamed:
>> '../Cuis/Learning-Cuis/CuisLiftsAboveItsWeight.png'
>
>
> See also
> *ImageReadWriter class >> imageMorphFromFileEntry:.*
>
> Happy hacking!
>
>
> On Sun, 2 Jun 2024 at 01:36, Mark Volkmann via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> I imagine that changing the image displayed in an `ImageMorph` requires
>> two statements, one to load an image from a file and one to change the
>> `ImageMorph`. I think the second one looks like this:
>>
>> `myImageMorph image: myImage.`
>>
>> What's the statement I need to set the variable `myImage` to an image
>> object?
>>
>> --
>> R. Mark Volkmann
>> Object Computing, Inc.
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240602/e4db5a9d/attachment.htm>


More information about the Cuis-dev mailing list