Hello,
Is it possible to avoid to open a new pane when browsing from a specialized inspector tab? I have a specialized inspector tab with a table. I want to be able to select a raw and get the value by calling #selection on the presentation but I don't want a new pane to be opened on this selection. By using noSelectionTransmission, there is no new pane opened but no selection available.
Christophe.
You can send noSelection to the presentation and get the result in the #rawSelection port.
Doru
On Thu, Nov 27, 2014 at 10:51 PM, Christophe Demarey < christophe.demarey@inria.fr> wrote:
Hello,
Is it possible to avoid to open a new pane when browsing from a specialized inspector tab? I have a specialized inspector tab with a table. I want to be able to select a raw and get the value by calling #selection on the presentation but I don't want a new pane to be opened on this selection. By using noSelectionTransmission, there is no new pane opened but no selection available.
Christophe. _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
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.
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?
Not right now. I will have to dig into it.
Doru
On Tue, Dec 2, 2014 at 11:22 AM, Christophe Demarey < Christophe.Demarey@inria.fr> wrote:
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?
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
2014-12-02 11:22 GMT+01:00 Christophe Demarey Christophe.Demarey@inria.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)
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) ] ]
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Le 2 déc. 2014 à 17:04, Nicolai Hess a écrit :
2014-12-02 11:22 GMT+01:00 Christophe Demarey Christophe.Demarey@inria.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?
The implementation of GLMPresentation>>#selection: seems strange. I would move the check "self acceptsSelection ifFalse: [^ self]." after setting the value in the rawSelection port. This way the selected value if still in the rawSelected port but no transmission is triggered. This change doesn't break any of the existing tests, so we will need to add also a new one :)
Cheers, Andrei
On Tue, Dec 2, 2014 at 1:04 PM, Nicolai Hess nicolaihess@web.de wrote:
2014-12-02 11:22 GMT+01:00 Christophe Demarey <Christophe.Demarey@inria.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)
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) ] ]
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Agreed.
Doru
On Thu, Dec 11, 2014 at 3:07 PM, Andrei Chis chisvasileandrei@gmail.com wrote:
The implementation of GLMPresentation>>#selection: seems strange. I would move the check "self acceptsSelection ifFalse: [^ self]." after setting the value in the rawSelection port. This way the selected value if still in the rawSelected port but no transmission is triggered. This change doesn't break any of the existing tests, so we will need to add also a new one :)
Cheers, Andrei
On Tue, Dec 2, 2014 at 1:04 PM, Nicolai Hess nicolaihess@web.de wrote:
2014-12-02 11:22 GMT+01:00 Christophe Demarey < Christophe.Demarey@inria.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)
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) ] ]
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev