[Cuis-dev] StringRequestMorph extension
Hilaire Fernandes
hfern at free.fr
Mon Jul 28 02:00:45 PDT 2025
Hi,
For the Art of Morph book, I have this example where StringRequestMorph
is extended as a FileRequesstMorph. The user can optionally selects a
file from the file selector panel below:
When a file is selected, its path is set on the TextModelMorph above.
However to get the #response event to be properly handled and the text
model morph entry updated, I have to toggle the hasUnacceptedEdits
attribute, this is obscure.
entry: anEntry
textMorph hasUnacceptedEdits: false.
response := anEntry asString.
self changed: #response.
textMorph hasUnacceptedEdits: true.
Any explanation?
Thanks
--
http://mamot.fr/@drgeo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250728/ddae5080/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ch02-FileRequestMorph.png
Type: image/png
Size: 19888 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250728/ddae5080/attachment-0001.png>
More information about the Cuis-dev
mailing list