[Cuis-dev] not understanding TextModelMorph

Mark Volkmann r.mark.volkmann at gmail.com
Thu Jun 13 13:02:32 PDT 2024


Here's a simple example.

VBook is a class I created with instance variables author and title. It has
the instance methods author, author:, title, and title:. Here are two of
them that I generated by right-clicking the class in a System Browser and
selecting "create inst var accessors".

author
    ^ author

author: anObject
    author := anObject

I ran this code in a Workspace:

book := VBook new author: 'R. Mark Volkmann'; title: 'htmx'.
tm := TextModelMorph
    textProvider: book
    textGetter: #author
    textSetter: #author.
tm openInWorld

The TextModelMorph opens displays my name. I can type into it. But it does
not change the value of the author instance variable in book. Isn't it
supposed to do that?

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


More information about the Cuis-dev mailing list