removing group nodes in Roassal2

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

removing group nodes in Roassal2

Usman Bhatti
Hi,

When removing grouped nodes from RTView, we get the red box. Try this script:

view := RTView new.
menuBuilder := RTMenuBuilder new view: view.
menuBuilder menu: 'Click Me' background: Color gray callback: [
view clean.
].
group := RTGroup new.
(1 to: 10) do: [:each| group add: ((RTBox new borderColor: (Color green); elementOn:each) 
@ RTDraggable;
+(RTLabel new color: (Color red);
text: each asString; yourself))].
view add: group.
RTVerticalLineLayout on: view elements.
view open.

Is it a bug or does it occur because of the wrong usage of RTGroup?
Usman

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

Re: removing group nodes in Roassal2

abergel
Hi!

Wrong usage of RTGroup :-)

You need to have "view addAll: group.” and _not_ “view add: group”
Maybe you want to add a signalUpdate in the callback.

Your script should be:
-=-=-=-=-=-=-=-=-=-=-=-=
| view |
view := RTView new.
menuBuilder := RTMenuBuilder new view: view.
menuBuilder menu: 'Click Me' background: Color gray callback: [
                view clean.
                view signalUpdate
].
group := RTGroup new.
(1 to: 10) do: [:each| group add: ((RTBox new borderColor: (Color green); elementOn:each)
                @ RTDraggable;
                +(RTLabel new color: (Color red);
                text: each asString; yourself))].
view addAll: group.
RTVerticalLineLayout on: view elements.
view open.
-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre


On Jun 6, 2014, at 7:05 PM, Usman Bhatti <[hidden email]> wrote:

> Hi,
>
> When removing grouped nodes from RTView, we get the red box. Try this script:
>
> view := RTView new.
> menuBuilder := RTMenuBuilder new view: view.
> menuBuilder menu: 'Click Me' background: Color gray callback: [
> view clean.
> ].
> group := RTGroup new.
> (1 to: 10) do: [:each| group add: ((RTBox new borderColor: (Color green); elementOn:each)
> @ RTDraggable;
> +(RTLabel new color: (Color red);
> text: each asString; yourself))].
> view add: group.
> RTVerticalLineLayout on: view elements.
> view open.
>
> Is it a bug or does it occur because of the wrong usage of RTGroup?
> Usman
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




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

Re: removing group nodes in Roassal2

Usman Bhatti
tx Alex.
I'll give it a try.


On Fri, Jun 6, 2014 at 9:28 PM, Alexandre Bergel <[hidden email]> wrote:
Hi!

Wrong usage of RTGroup :-)

You need to have "view addAll: group.” and _not_ “view add: group”
Maybe you want to add a signalUpdate in the callback.

Your script should be:
-=-=-=-=-=-=-=-=-=-=-=-=
| view |
view := RTView new.
menuBuilder := RTMenuBuilder new view: view.
menuBuilder menu: 'Click Me' background: Color gray callback: [
                view clean.
                view signalUpdate
].
group := RTGroup new.
(1 to: 10) do: [:each| group add: ((RTBox new borderColor: (Color green); elementOn:each)
                @ RTDraggable;
                +(RTLabel new color: (Color red);
                text: each asString; yourself))].
view addAll: group.
RTVerticalLineLayout on: view elements.
view open.
-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre


On Jun 6, 2014, at 7:05 PM, Usman Bhatti <[hidden email]> wrote:

> Hi,
>
> When removing grouped nodes from RTView, we get the red box. Try this script:
>
> view := RTView new.
> menuBuilder := RTMenuBuilder new view: view.
> menuBuilder menu: 'Click Me' background: Color gray callback: [
>               view clean.
> ].
> group := RTGroup new.
> (1 to: 10) do: [:each| group add: ((RTBox new borderColor: (Color green); elementOn:each)
>               @ RTDraggable;
>               +(RTLabel new color: (Color red);
>               text: each asString; yourself))].
> view add: group.
> RTVerticalLineLayout on: view elements.
> view open.
>
> Is it a bug or does it occur because of the wrong usage of RTGroup?
> Usman
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
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