quick question on Glamour

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

quick question on Glamour

EstebanLM
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

Esteban
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: quick question on Glamour

Andrei Chis
So you the browser to have an initial selection?
If yes you need to use initialized:

|browser |
browser := GLMTabulator new.
browser column: #one.
browser transmit to: #one; andShow: [ :a |
a tree
children: [:x :i | x asString size > 1 ifTrue: [x] ifFalse: [OrderedCollection new] ];
initialize: [ :tree | tree selection: #($e $f) ] ].
browser openOn: #(($a $b $c $d) ($e $f) ($g $h $i $j $l)).

Cheers,
Andrei

On Fri, May 8, 2015 at 12:52 PM, Esteban Lorenzano <[hidden email]> wrote:
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

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


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: quick question on Glamour

EstebanLM
cool, thanks!

On 08 May 2015, at 13:25, Andrei Chis <[hidden email]> wrote:

So you the browser to have an initial selection?
If yes you need to use initialized:

|browser |
browser := GLMTabulator new.
browser column: #one.
browser transmit to: #one; andShow: [ :a |
a tree
children: [:x :i | x asString size > 1 ifTrue: [x] ifFalse: [OrderedCollection new] ];
initialize: [ :tree | tree selection: #($e $f) ] ].
browser openOn: #(($a $b $c $d) ($e $f) ($g $h $i $j $l)).

Cheers,
Andrei

On Fri, May 8, 2015 at 12:52 PM, Esteban Lorenzano <[hidden email]> wrote:
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

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

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


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: quick question on Glamour

EstebanLM
In reply to this post by Andrei Chis
and yet another problem :)

now I have two custom browsers 

b … andShow: [ :a |
a custom: self buildBrowserA.
a custom: self buildBrowserB ].

that show some tabs.. well, now, under certain conditions, I need the browser to start in the second tab, not the first… imagine a browser and a selection instance/class side, I want to open it in class side… but just if I’m showing a class side method :)

how to?

thanks,
Esteban


On 08 May 2015, at 13:25, Andrei Chis <[hidden email]> wrote:

So you the browser to have an initial selection?
If yes you need to use initialized:

|browser |
browser := GLMTabulator new.
browser column: #one.
browser transmit to: #one; andShow: [ :a |
a tree
children: [:x :i | x asString size > 1 ifTrue: [x] ifFalse: [OrderedCollection new] ];
initialize: [ :tree | tree selection: #($e $f) ] ].
browser openOn: #(($a $b $c $d) ($e $f) ($g $h $i $j $l)).

Cheers,
Andrei

On Fri, May 8, 2015 at 12:52 PM, Esteban Lorenzano <[hidden email]> wrote:
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

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

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


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: quick question on Glamour

EstebanLM
bump :P

On 08 May 2015, at 16:24, Esteban Lorenzano <[hidden email]> wrote:

and yet another problem :)

now I have two custom browsers 

b … andShow: [ :a |
a custom: self buildBrowserA.
a custom: self buildBrowserB ].

that show some tabs.. well, now, under certain conditions, I need the browser to start in the second tab, not the first… imagine a browser and a selection instance/class side, I want to open it in class side… but just if I’m showing a class side method :)

how to?

thanks,
Esteban


On 08 May 2015, at 13:25, Andrei Chis <[hidden email]> wrote:

So you the browser to have an initial selection?
If yes you need to use initialized:

|browser |
browser := GLMTabulator new.
browser column: #one.
browser transmit to: #one; andShow: [ :a |
a tree
children: [:x :i | x asString size > 1 ifTrue: [x] ifFalse: [OrderedCollection new] ];
initialize: [ :tree | tree selection: #($e $f) ] ].
browser openOn: #(($a $b $c $d) ($e $f) ($g $h $i $j $l)).

Cheers,
Andrei

On Fri, May 8, 2015 at 12:52 PM, Esteban Lorenzano <[hidden email]> wrote:
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

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

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



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: quick question on Glamour

Tudor Girba-2
You mean that when you start, you want to have the second tab open?

Doru

On Mon, May 11, 2015 at 12:04 PM, Esteban Lorenzano <[hidden email]> wrote:
bump :P

On 08 May 2015, at 16:24, Esteban Lorenzano <[hidden email]> wrote:

and yet another problem :)

now I have two custom browsers 

b … andShow: [ :a |
a custom: self buildBrowserA.
a custom: self buildBrowserB ].

that show some tabs.. well, now, under certain conditions, I need the browser to start in the second tab, not the first… imagine a browser and a selection instance/class side, I want to open it in class side… but just if I’m showing a class side method :)

how to?

thanks,
Esteban


On 08 May 2015, at 13:25, Andrei Chis <[hidden email]> wrote:

So you the browser to have an initial selection?
If yes you need to use initialized:

|browser |
browser := GLMTabulator new.
browser column: #one.
browser transmit to: #one; andShow: [ :a |
a tree
children: [:x :i | x asString size > 1 ifTrue: [x] ifFalse: [OrderedCollection new] ];
initialize: [ :tree | tree selection: #($e $f) ] ].
browser openOn: #(($a $b $c $d) ($e $f) ($g $h $i $j $l)).

Cheers,
Andrei

On Fri, May 8, 2015 at 12:52 PM, Esteban Lorenzano <[hidden email]> wrote:
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

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

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



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: quick question on Glamour

Andrei Chis
In reply to this post by EstebanLM
There is no support by default in glamour to change the selected tab.
You could hack it like in the example below.
I do not know if there is a better way,

browser := GLMTabulator new.
browser row: #r.

browser transmit to: #r; andShow: [ :composite |
composite list title: 'A'.
composite list title: 'B' ].

browser openOn:  (1to:10).

composite := browser panes first presentations.
composite pane lastActivePresentation: composite presentations second

Cheers,
Andrei

On Mon, May 11, 2015 at 12:04 PM, Esteban Lorenzano <[hidden email]> wrote:
bump :P

On 08 May 2015, at 16:24, Esteban Lorenzano <[hidden email]> wrote:

and yet another problem :)

now I have two custom browsers 

b … andShow: [ :a |
a custom: self buildBrowserA.
a custom: self buildBrowserB ].

that show some tabs.. well, now, under certain conditions, I need the browser to start in the second tab, not the first… imagine a browser and a selection instance/class side, I want to open it in class side… but just if I’m showing a class side method :)

how to?

thanks,
Esteban


On 08 May 2015, at 13:25, Andrei Chis <[hidden email]> wrote:

So you the browser to have an initial selection?
If yes you need to use initialized:

|browser |
browser := GLMTabulator new.
browser column: #one.
browser transmit to: #one; andShow: [ :a |
a tree
children: [:x :i | x asString size > 1 ifTrue: [x] ifFalse: [OrderedCollection new] ];
initialize: [ :tree | tree selection: #($e $f) ] ].
browser openOn: #(($a $b $c $d) ($e $f) ($g $h $i $j $l)).

Cheers,
Andrei

On Fri, May 8, 2015 at 12:52 PM, Esteban Lorenzano <[hidden email]> wrote:
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

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

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



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



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: quick question on Glamour

EstebanLM
In reply to this post by Tudor Girba-2
yes :)

On 11 May 2015, at 12:14, Tudor Girba <[hidden email]> wrote:

You mean that when you start, you want to have the second tab open?

Doru

On Mon, May 11, 2015 at 12:04 PM, Esteban Lorenzano <[hidden email]> wrote:
bump :P

On 08 May 2015, at 16:24, Esteban Lorenzano <[hidden email]> wrote:

and yet another problem :)

now I have two custom browsers 

b … andShow: [ :a |
a custom: self buildBrowserA.
a custom: self buildBrowserB ].

that show some tabs.. well, now, under certain conditions, I need the browser to start in the second tab, not the first… imagine a browser and a selection instance/class side, I want to open it in class side… but just if I’m showing a class side method :)

how to?

thanks,
Esteban


On 08 May 2015, at 13:25, Andrei Chis <[hidden email]> wrote:

So you the browser to have an initial selection?
If yes you need to use initialized:

|browser |
browser := GLMTabulator new.
browser column: #one.
browser transmit to: #one; andShow: [ :a |
a tree
children: [:x :i | x asString size > 1 ifTrue: [x] ifFalse: [OrderedCollection new] ];
initialize: [ :tree | tree selection: #($e $f) ] ].
browser openOn: #(($a $b $c $d) ($e $f) ($g $h $i $j $l)).

Cheers,
Andrei

On Fri, May 8, 2015 at 12:52 PM, Esteban Lorenzano <[hidden email]> wrote:
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

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

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



_______________________________________________
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


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: quick question on Glamour

EstebanLM
In reply to this post by Andrei Chis
ok, I hacked it like this: 

buildMethodsPaneOn: presenter
| instanceSide classSide |

presenter custom: (instanceSide := self buildMethodsInstanceSidePaneOn: presenter).
presenter custom: (classSide := self buildMethodsClassSidePaneOn: presenter).
presenter initialize: [ :accumulator |
SBStartingPath startingInstanceSideSelection 
ifFalse: [ accumulator pane lastActivePresentation: classSide ] ]

but probably this could have an specific idiom?

cheers,
Esteban

On 11 May 2015, at 12:17, Andrei Chis <[hidden email]> wrote:

There is no support by default in glamour to change the selected tab.
You could hack it like in the example below.
I do not know if there is a better way,

browser := GLMTabulator new.
browser row: #r.

browser transmit to: #r; andShow: [ :composite |
composite list title: 'A'.
composite list title: 'B' ].

browser openOn:  (1to:10).

composite := browser panes first presentations.
composite pane lastActivePresentation: composite presentations second

Cheers,
Andrei

On Mon, May 11, 2015 at 12:04 PM, Esteban Lorenzano <[hidden email]> wrote:
bump :P

On 08 May 2015, at 16:24, Esteban Lorenzano <[hidden email]> wrote:

and yet another problem :)

now I have two custom browsers 

b … andShow: [ :a |
a custom: self buildBrowserA.
a custom: self buildBrowserB ].

that show some tabs.. well, now, under certain conditions, I need the browser to start in the second tab, not the first… imagine a browser and a selection instance/class side, I want to open it in class side… but just if I’m showing a class side method :)

how to?

thanks,
Esteban


On 08 May 2015, at 13:25, Andrei Chis <[hidden email]> wrote:

So you the browser to have an initial selection?
If yes you need to use initialized:

|browser |
browser := GLMTabulator new.
browser column: #one.
browser transmit to: #one; andShow: [ :a |
a tree
children: [:x :i | x asString size > 1 ifTrue: [x] ifFalse: [OrderedCollection new] ];
initialize: [ :tree | tree selection: #($e $f) ] ].
browser openOn: #(($a $b $c $d) ($e $f) ($g $h $i $j $l)).

Cheers,
Andrei

On Fri, May 8, 2015 at 12:52 PM, Esteban Lorenzano <[hidden email]> wrote:
I have a browser with a tree and a text after it…
I want my browser to show with an initial value. This does not seems to work:

presenter tree;
        children: [ :node | node children ];
        selection: { someNode }.

nor:

presenter tree;
        children: [ :node | node children ];
        selectionPath: { someNode }.

I’m lost :)

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

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



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


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


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