[Cuis-dev] question about changing instance variables in an Inspect window

Juan Vuletich juan at cuis.st
Mon Jul 1 06:32:35 PDT 2024


I'm on the verge of taking offense here.

Still, I hope you see that we have already spent way more time and 
effort in answering your questions than you have spent in 
http://www.catb.org/~esr/faqs/smart-questions.html

On 6/30/2024 11:17 AM, admin at stede.me admin--- via Cuis-dev wrote:
> Wow, an actual answer.
>> On 06/29/2024 8:23 PM EDT Vanessa Freudenberg via Cuis-dev 
>> <cuis-dev at lists.cuis.st> wrote:
>> If you simply set the color instance variable, the morph is not 
>> redrawn. If you click the morph after, you will see that it is indeed 
>> blue.
>> The #color: method takes care of both setting the instance variable 
>> and invalidating the morph so it gets redrawn automatically.
>> Vanessa
>>
>> On Sat, Jun 29, 2024 at 16:45 Mark Volkmann via Cuis-dev 
>> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>>
>>     Can someone explain what's going on near the end of this sequence
>>     of basic steps?
>>     - Open the World menu and select "New Morph...".
>>     - Select "Basic...Boxed Morph" or really any morph with a
>>     background fill color.
>>       An orange rectangle will appear, attached to the mouse cursor.
>>     - Move to where you want to place it and click to drop it.
>>     - cmd-click (macOS) on the morph to open its halo.
>>     - Click the blue button on the top row.
>>     - Select "debug...inspect morph" to open an Inspect window
>>        for the object that represents that morph.
>>     - Click the `color` instance variable and note that the value is
>>     a `Color` object.
>>     - Click in the bottom pane.
>>     - Enter `color := Color red` and "Do it".
>>     - Note that the value of the instance variable in the upper-right
>>     pane updates to `Color red`,
>>       BUT the fill color of the morph does not change.
>>     - Enter `self color: Color blue` and "Do it".
>>     - Note that the value of the instance variable in the upper-right
>>     pane updates to `Color blue`,
>>       AND the fill color of the morph changes to blue.
>>     Why does the first approach not update the morph, but the second
>>     approach does?
>>     Both update the value of the instance variable inside the Inspect
>>     window.
>>     -- 
>>     R. Mark Volkmann
>>     Object Computing, Inc.
>>     -- 
>>     Cuis-dev mailing list
>>     Cuis-dev at lists.cuis.st <mailto: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 


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240701/45693b98/attachment-0001.htm>


More information about the Cuis-dev mailing list