[Cuis-dev] change image in ImageMorph

Mark Volkmann r.mark.volkmann at gmail.com
Sun Jun 2 07:28:49 PDT 2024


Thanks for the feedback! I definitely want to learn the proper terminology
for everything in Smalltalk.
Interestingly though, in a System Browser when I'm ready to implement a new
method I see this in the bottom pane:

messageSelectorAndArgumentNames
"comment stating purpose of message"

| temporary variable names |
statements

So it seems the term "statement" is used in the template for creating new
methods.

On Sat, Jun 1, 2024 at 10:25 PM Hernán Wilkinson via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> 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
>>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240602/d4f49b87/attachment.htm>


More information about the Cuis-dev mailing list