In experimenting with creating a custom inspector for my domain object, I came across the following intriguing method:
Float>>#gtInspectorFloatIn: composite <gtInspectorPresentationOrder: 30> ^ composite table title: 'Float'; display: [ ... {'binary' -> self binaryLiteralString. 'significand' -> self significand. 'exponent' -> self exponent} ]; column: 'Key' evaluated: #key; column: 'Value' evaluated: #value; send: #value
While it was easy enough to adapt this to my needs, I found the #display: and #send: sends quite strange. #display: seems like a strange API - like we're using an object designed to do something other than inspect objects; and I wasn't sure what exactly #send: did, my presentation seemed to function the same way with or without it...
----- Cheers, Sean -- View this message in context: http://forum.world.st/gtPresentation-display-tp4806066.html Sent from the Moose mailing list archive at Nabble.com.
Sean P. DeNigris wrote
#display: seems like a strange API
Besides being odd, #display-ing an array of associations doesn't quite "do the right thing". When a row is clicked in a collection inspector, the next playground pane opens on the value, but in this case, the next pane opens on the fieldName->value association!
----- Cheers, Sean -- View this message in context: http://forum.world.st/gtPresentation-display-tp4806066p4806067.html Sent from the Moose mailing list archive at Nabble.com.
Sean P. DeNigris wrote
the next pane opens on the fieldName->value association!
Never mind... ha ha... I discovered what #send: does ;)
----- Cheers, Sean -- View this message in context: http://forum.world.st/gtPresentation-display-tp4806066p4806068.html Sent from the Moose mailing list archive at Nabble.com.
:).
To summarize: - display: is a transformation that takes the input object and transforms it in a model object suitable for the presentation - send: is a transformation that takes the #rawSelection object and transforms it in the #selection and this is what the Pager reacts on.
Cheers, Doru
On Tue, Feb 17, 2015 at 2:23 AM, Sean P. DeNigris sean@clipperadams.com wrote:
Sean P. DeNigris wrote
the next pane opens on the fieldName->value association!
Never mind... ha ha... I discovered what #send: does ;)
Cheers, Sean -- View this message in context: http://forum.world.st/gtPresentation-display-tp4806066p4806068.html Sent from the Moose mailing list archive at Nabble.com. _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev