I was writing Magritte descriptions for a JenkinsServer object and wanted to
semi-automate the creation of buttons to start and stop the UI. Something
like MAContainerMorph>>#addButtons, but sending messages to the model
object.
As a start, I made a new annotation to tag unary methods that are part of
the public API, so you can write e.g.:
stop
<magritteAction>
ZnEasy get: 'http://localhost:', self port asString, '/exit'.
[ self isRunning ] whileTrue: [ self wait ].
process close; closePipes.
Then I patched MAContainerMorph [1] to add the buttons for all such actions.
The result is a toolbar added to Magritte views, like:
<http://forum.world.st/file/n4693208/Screen_Shot_2013-06-13_at_1.13.19_PM.png>
What do you guys think?
[1] I'd like to generalize it to the description level so that it's
available in Seaside, etc
-----
Cheers,
Sean
--
View this message in context:
http://forum.world.st/Model-actions-tp4693208.html
Sent from the Magritte, Pier and Related Tools mailing list archive at
Nabble.com.