Le 2 déc. 2014 à 17:04, Nicolai Hess a écrit :
2014-12-02 11:22 GMT+01:00 Christophe Demarey
<Christophe.Demarey(a)inria.fr>fr>:
Le 28 nov. 2014 à 11:47, Christophe Demarey a écrit :
Le 28 nov. 2014 à 09:26, Christophe Demarey a écrit :
Le 28 nov. 2014 à 07:21, Tudor Girba a écrit :
You can send noSelection to the presentation and
get the result in the #rawSelection port.
oh, I miss the rawSelection port. Thanks
It does not work. The rawSelection also has a nil value if I send noSelection to the
presentation
Any idea why it does not work?
I don't know why this does not work, (or why it is build that way,
in GLMPresentation>>#selection: the transmission for rawSelections is omitted, if
#acceptsSelections is false)
Indeed. Should GtInspector accept Selection by default?
But looking at the pragma inspector pane (for compiled
methods) for example, it looks like you can add a special inspector
pane that handles selection without opening another (inspector-)pane.
The Pragma inspector shows two lists, a list of pragmas of this method. And a list of
methods using this pragma.
If you select an entry in the list of pragmas, there is no new (inspector-)pane, just a
new pane in this Pragam-tab.
Here is an example, that I made similiar to the code in the Pragma-Inspect, but
here I use it as another implementation for a collection inspector. add this method at
the Collection class.
gtInspectorItemsInX: composite
<gtInspectorPresentationOrder: 30>
composite tabulator
title: 'Collection inspector';
with: [ :t |
t
row: [ :r |
r
column: #items;
column: #text ];
row: #object.
t transmit
to: #items;
andShow: [ :a | a list ].
t transmit
to: #object;
andShow: [ :a | a text display:[:x | 'nothing here'] ].
t transmit
to: #text;
andShow: [ :a | a text display:[:x | 'nothing here'] ].
t transmit
from: #items;
to: #text;
andShow: [ :a | a text display: [ :x | (GTObjectPrinter new
asTruncatedTextFrom: x) asString ] ].
t transmit
from: #items;
to: #object;
andShow: [ :a |
a
custom:
(GTObjectVariablesBrowser new) ] ]
Thanks a lot for this example. In my case, I do not use a tabulator (subclass of
GLMBrowser) but a table that is not subclass of GLMBrowser (it is subclass of
GLMPresentation) and so, do not have the transmit message available.
The drawback to use tabulator is that it opens a new tab browser inside the tab.
Maybe the best option is to fix the rawSelection?