Whoops, I spoke too soon. Just a bit more to go.
It is working well when manually executing the context menu action on
the element after the window has opened. However I am having trouble
using it from glamour inside my application. For background info, in
Workspace compare the following two scripts. The first one works
while the second one doesn't. The requirement is that the
#bottomLeftOn: must executed after the #open.
-------------
| rawView |
rawView := ROView new @ RODraggable.
#(1 2 3 4 5 6 7 8 9) do: [ :x | rawView add: (ROElement spriteOn: x) +
ROLabel ].
(ROHorizontalTreeLayout new verticalGap: 40; horizontalGap:60) on:
rawView elements.
rawView open.
ROFocusView bottomLeftOn: (rawView elements detect: [ :x | x model = 7
]).
-------------
| rawView |
rawView := ROView new @ RODraggable.
#(1 2 3 4 5 6 7 8 9) do: [ :x | rawView add: (ROElement spriteOn: x) +
ROLabel ].
(ROHorizontalTreeLayout new verticalGap: 40; horizontalGap:60) on:
rawView elements.
ROFocusView bottomLeftOn: (rawView elements detect: [ :x | x model = 7
]).
rawView open.
-------------
However when using Glamour, an #open is implicitly executed after the
script, and I _cannot_ determine how to execute the #bottomLeftOn:
after that #open.
For example, try "World > Moose > Glamorous Roassal Easel" with the
following script...
------------
rawView := view view.
#(1 2 3 4 5 6 7 8 9) do: [ :x | rawView add: (ROElement spriteOn: x) +
ROLabel ].
(ROHorizontalTreeLayout new verticalGap: 40; horizontalGap:60) on:
rawView elements.
ROFocusView bottomLeftOn: (rawView elements detect: [ :x | x model = 7
]).
--------------
The ultimate goal is to have something similar to the following script
that works within my application. Note that currently "element-7" is
displayed sitting just above 0@0, which is the returned size of the
window used for calculation.
----------------
browser := GLMTabulator new.
browser column: #testtab.
browser transmit
to: #testtab;
andShow: [ :a | a roassal
title: 'TestTab' ;
painting:
[ :moview :selection | |roview|
roview := moview view.
#(1 2 3 4 5 6 7 8 9) do: [ :x | roview add: (ROElement
spriteOn: x) + ROLabel ].
(ROHorizontalTreeLayout new verticalGap: 40;
horizontalGap:60) on: roview elements.
ROFocusView bottomLeftOn: (roview elements detect: [ :x
| x model = 7 ]).
]
].
browser openOn: 1.
-----------------
Hopefully you have some magic to get the last one to work.
cheers -ben
Ben Coman wrote:
Thanks Alexandre. That works really well now -
including with
resized windows.
cheers -ben
Alexandre Bergel wrote:
Hi Ben,
Can you try with the last version? This should be solved now
Alexandre
[lots deleted]
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev