Re: [Moose-dev] Glamour-Merilin-Mondrian

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

Re: [Moose-dev] Glamour-Merilin-Mondrian

Júlio Martins
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Glamour-Merilin-Mondrian

Tudor Girba-2
Hi,

Ok. As I mentioned before in the block of the browser action you are
using a "transmit". However, this does not actually triggers the
transmission, it just defines a transmission. This transmission will
only be triggered when one of the origin ports changes.

So, coming back to the problem, you should change the logic of the
information flow by:
- having the browser action store a value in a port, and
- having the transmission to the pane with the mondrian visualization
depend on this port.

Here is an example:
browser := GLMTabulator new.
browser column: #index; column: #visualization.
browser act: [:b |
        | newStartString newStart |
        newStartString := UIManager default
                request: 'Provide new start number'
                initialAnswer: (b pane port: #startNumber) value.
        newStart := [newStartString asNumber] on: Error do: [:e | 1 ].
        (b pane port: #startNumber) value: newStart ] entitled: 'Change the
start number'.

browser transmit to: #index; andShow: [:a | a list display: [:x | 1 to: x ]].
browser transmit from: #index; fromOutsidePort: #startNumber; to:
#visualization; andShow: [:a |
        a mondrian
                painting: [:view :end :start |
                        view shape label.
                        view nodes: ((start ifNil: [1]) to: (end ifNil: [1000]))];
                allowNil.
        ].
browser openOn: 42.

This is a pretty dumb example, but the point is that the visualization
depends on two ports: one provided by a selection from the index pane,
and one provided by triggering an action from the browser.

Cheers,
Doru



2011/12/19 Júlio Martins <[hidden email]>:

>
>
>>> Correting the code
>>>
>>> | filterWizard view |
>>> browser := GLMTabulator withStatusbar.
>>> filterWizard := BMBugMapsFilterWizard new. "a child of WizardControl"
>>> browser
>>> row: [ :row | row column: #map span: 2.5; column: #metrics] span: 1.5;
>>> row: [ :row | row column: #code span: 2.5; column: #chart].
>>>
>>> browser transmit
>>> to: #map;
>>> andShow: [ :b | self distributionMapIn: b].
>>>
>>> filterWizard :=  BMBugMapsFilterWizard new.
>
>               filterWizard
>>>
>>> glamourWizard
>>> initialExtent: 400@200;
>>> yourself.
>>>
>>> browser
>>> spawn: [:a|
>>> filterWizard
>>> atEndDo:[:wizardInformation| .
>>> self distributionMapIn: a with: (wizardInformation at: #textEntry).
>>> a update.].
>>> ] entitled: 'Filter'.
>>>
>>> where self is an instance of GLMBrowserTemplate.
>>>
>>>
>>> On 19 December 2011 10:51, Tudor Girba <[hidden email]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> If the first parameter is a browser, something is probably wrong (you
>>>> might be using the wrong api). Please send also the browser code.
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>> 2011/12/19 Júlio Martins <[hidden email]>:
>>>> > Ok!
>>>> >
>>>> > distributionMapIn: a with: aNumber
>>>> >
>>>> >         "in this point the method is executed"
>>>> >
>>>> > ^a mondrian
>>>> > painting: [ :view :model | self halt.
>>>> > view shape rectangle withoutBorder.
>>>> > view nodes: (model allModelNamespaces asSet sortedAs: [ :x :y | x
>>>> > numberOfClasses > y numberOfClasses ]) forEach: [ :each |
>>>> > view shape label.
>>>> > view node: each name.
>>>> > view node: each forIt: [
>>>> > view interaction menu: #mooseMenu.
>>>> > view shape rectangle size: 12;
>>>> > if: [ :c | c numberOfMethods = 0 ] fillColor: Color green;
>>>> > if: [ :c | c numberOf Methods  >= 1 and: [ c numberOfBugs < 3 ] ]
>>>> > fillColor:
>>>> > Color orange;
>>>> > if: [ :c | c numberOfMethods >= 3 ] fillColor: Color red.
>>>> > view nodes: ((each classes select: [ :class | class numberOf
>>>> > Methods  >=
>>>> > aNumber]) sortedAs: #numberOfMethods).
>>>> >
>>>> > view gridLayout gapSize: 2 ].
>>>> > view verticalLineLayout ].
>>>> > view gridLayout ].
>>>> >
>>>> > the first method parameter is a GLMTabulator, The block started by the
>>>> > method "halt" is not executed, I no wonder why!
>
>
>
> ________________________________
> View this message in context: Re: [Moose-dev] Glamour-Merilin-Mondrian
>
> 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
>



--
www.tudorgirba.com

"Every thing has its own flow"

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