gtPresentation - #display:?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gtPresentation - #display:?

Sean P. DeNigris
Administrator
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
Reply | Threaded
Open this post in threaded view
|

Re: gtPresentation - #display:?

Sean P. DeNigris
Administrator
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
Reply | Threaded
Open this post in threaded view
|

Re: gtPresentation - #display:?

Sean P. DeNigris
Administrator
Sean P. DeNigris wrote
the next pane opens on the fieldName->value association!
Never mind... ha ha... I discovered what #send: does ;)
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: gtPresentation - #display:?

Tudor Girba-2
:).

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 <[hidden email]> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev