[Cuis-dev] my first submitted change set

Mark Volkmann r.mark.volkmann at gmail.com
Sun Sep 1 14:03:28 PDT 2024


In the Todo app I created in order to learn more about Morphic, I needed to
execute some code when the extent of PluggableScrollPane is changed. The
code changes the size of the "scroller" morph associated with the
PluggableScrollPane. Here's a snippet this shows how I use it:

scrollPane onExtentChanged: [ :newExtent |
    todosPane morphWidth: (scrollPane hScrollBarWidth - 10).
].

To achieve this, I created a subclass of PluggableScrollPane that adds
the onExtentChanged:
method.

The attached ChangeSet adds this capability to PluggableScrollPane so
it's unnecessary to create a subclass. It does three things:

- adds the instance variable onExtentChanged
- adds the instance method extendChanged: to set that instance variable to
a block
- adds the following line to the end of the existing extentChanged: method

 onExtentChanged ifNotNil: [ onExtentChanged value: self morphExtent ].

Does this seem worthy of adding to PluggableScrollPane?

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240901/b2bc1944/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6665-CuisCore-MarkVolkmann-2024Sep01-15h34m-RMV.001.cs.st
Type: application/octet-stream
Size: 1334 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240901/b2bc1944/attachment.obj>


More information about the Cuis-dev mailing list