z-ordering PopupView in GLMRoassalPresentation

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

z-ordering PopupView in GLMRoassalPresentation

Usman Bhatti
Hello,

When creating a visualization with Roassal in a Glamour browser, the popup view is shown behind the entity on which popup is invoked. Here is the code to reproduce:

| browser |
browser := GLMTabulator withStatusbar.
browser column: #visu.
browser transmit to: #visu; andShow: [ :a |
a roassal 
painting: [:view :number | 
|  popupView inner  aView outerElement| 
popupView := ROView new.
aView := view raw.
outerElement :=  (ROElement on: 'Outer').
popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
outerElement add: inner.
inner @ (ROPopupView new view: popupView).
aView add: outerElement.
]].
browser openOn: 42.

Although the problem does not occur without Glamour:

|  popupView inner  aView outerElement| 
popupView := ROView new.
aView := ROView new.
outerElement :=  (ROElement on: 'Outer').
popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
outerElement add: inner.
inner @ (ROPopupView new view: popupView).
aView add: outerElement.
aView open


Is this a bug or do I need to set some property for my nodes?

tx,

Usman

Inline image 8Inline image 7Inline image 6Inline image 5

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

Re: z-ordering PopupView in GLMRoassalPresentation

jfabry

I had the same problem with popups in Roassal not always being on top. There is a fix, which is to use the view stack instead of the view itself, i.e. do:

ROPopup new receivingView: aView stack

HTH.,

On Oct 7, 2013, at 9:41 AM, Usman Bhatti <[hidden email]> wrote:

> Hello,
>
> When creating a visualization with Roassal in a Glamour browser, the popup view is shown behind the entity on which popup is invoked. Here is the code to reproduce:
>
> | browser |
> browser := GLMTabulator withStatusbar.
> browser column: #visu.
> browser transmit to: #visu; andShow: [ :a |
> a roassal
> painting: [:view :number |
> |  popupView inner  aView outerElement|
> popupView := ROView new.
> aView := view raw.
> outerElement :=  (ROElement on: 'Outer').
> popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
> inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
> outerElement add: inner.
>
> inner @ (ROPopupView new view: popupView).
> aView add: outerElement.
> ]].
> browser openOn: 42.
>
> Although the problem does not occur without Glamour:
>
> |  popupView inner  aView outerElement|
> popupView := ROView new.
> aView := ROView new.
> outerElement :=  (ROElement on: 'Outer').
> popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
> inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
> outerElement add: inner.
> inner @ (ROPopupView new view: popupView).
> aView add: outerElement.
> aView open
>
>
> Is this a bug or do I need to set some property for my nodes?
>
> tx,
>
> Usman
>
> <Screen Shot 2013-10-07 at 2.55.50 PM.png><Screen Shot 2013-10-07 at 2.55.27 PM.png><Screen Shot 2013-10-07 at 2.54.23 PM.png><Screen Shot 2013-10-07 at 2.54.14 PM.png>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


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

Re: z-ordering PopupView in GLMRoassalPresentation

abergel
In reply to this post by Usman Bhatti
As Johan says, you need to specify the receiverView:. An improved version of yourscript:

| browser |
        browser := GLMTabulator withStatusbar.
        browser column: #visu.
        browser transmit to: #visu; andShow: [ :a |
                a roassal
                        painting: [:view :number |
                |  popupView inner  aView outerElement|
                        popupView := ROView new.
                        aView := view raw.
                        outerElement :=  (ROElement on: 'Outer').
                popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
                inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
                outerElement add: inner.
               
                inner @ (ROPopupView new view: popupView; receivingView: view stack).
        aView add: outerElement.
                ]].
        browser openOn: 42.


On Oct 7, 2013, at 9:41 AM, Usman Bhatti <[hidden email]> wrote:

> Hello,
>
> When creating a visualization with Roassal in a Glamour browser, the popup view is shown behind the entity on which popup is invoked. Here is the code to reproduce:
>
> | browser |
> browser := GLMTabulator withStatusbar.
> browser column: #visu.
> browser transmit to: #visu; andShow: [ :a |
> a roassal
> painting: [:view :number |
> |  popupView inner  aView outerElement|
> popupView := ROView new.
> aView := view raw.
> outerElement :=  (ROElement on: 'Outer').
> popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
> inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
> outerElement add: inner.
>
> inner @ (ROPopupView new view: popupView).
> aView add: outerElement.
> ]].
> browser openOn: 42.
>
> Although the problem does not occur without Glamour:
>
> |  popupView inner  aView outerElement|
> popupView := ROView new.
> aView := ROView new.
> outerElement :=  (ROElement on: 'Outer').
> popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
> inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
> outerElement add: inner.
> inner @ (ROPopupView new view: popupView).
> aView add: outerElement.
> aView open
>
>
> Is this a bug or do I need to set some property for my nodes?
>
> tx,
>
> Usman
>
> <Screen Shot 2013-10-07 at 2.55.50 PM.png><Screen Shot 2013-10-07 at 2.55.27 PM.png><Screen Shot 2013-10-07 at 2.54.23 PM.png><Screen Shot 2013-10-07 at 2.54.14 PM.png>
> _______________________________________________
> 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: z-ordering PopupView in GLMRoassalPresentation

Usman Bhatti
Tx Johan and Alex.

The fix works.


On Mon, Oct 7, 2013 at 8:12 PM, Alexandre Bergel <[hidden email]> wrote:
As Johan says, you need to specify the receiverView:. An improved version of yourscript:

| browser |
        browser := GLMTabulator withStatusbar.
        browser column: #visu.
        browser transmit to: #visu; andShow: [ :a |
                a roassal
                        painting: [:view :number |
                |  popupView inner  aView outerElement|
                        popupView := ROView new.
                        aView := view raw.
                        outerElement :=  (ROElement on: 'Outer').
                popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
                inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
                outerElement add: inner.

                inner @ (ROPopupView new view: popupView; receivingView: view stack).
        aView add: outerElement.
                ]].
        browser openOn: 42.


On Oct 7, 2013, at 9:41 AM, Usman Bhatti <[hidden email]> wrote:

> Hello,
>
> When creating a visualization with Roassal in a Glamour browser, the popup view is shown behind the entity on which popup is invoked. Here is the code to reproduce:
>
> | browser |
>       browser := GLMTabulator withStatusbar.
>       browser column: #visu.
>       browser transmit to: #visu; andShow: [ :a |
>               a roassal
>                       painting: [:view :number |
>               |  popupView inner  aView outerElement|
>                       popupView := ROView new.
>                       aView := view raw.
>                       outerElement :=  (ROElement on: 'Outer').
>               popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
>               inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
>               outerElement add: inner.
>
>               inner @ (ROPopupView new view: popupView).
>       aView add: outerElement.
>               ]].
>       browser openOn: 42.
>
> Although the problem does not occur without Glamour:
>
> |  popupView inner  aView outerElement|
>       popupView := ROView new.
>       aView := ROView new.
>       outerElement :=  (ROElement on: 'Outer').
>       popupView add: (ROElement new extent: 50@50; model: 'popup')+ (ROBox new color: Color blue).
>       inner := (ROElement sprite) + (ROBox new borderWidth: 1; color: (Color gray: 0.9)); extent: 150@100.
>       outerElement add: inner.
>       inner @ (ROPopupView new view: popupView).
>       aView add: outerElement.
>       aView open
>
>
> Is this a bug or do I need to set some property for my nodes?
>
> tx,
>
> Usman
>
> <Screen Shot 2013-10-07 at 2.55.50 PM.png><Screen Shot 2013-10-07 at 2.55.27 PM.png><Screen Shot 2013-10-07 at 2.54.23 PM.png><Screen Shot 2013-10-07 at 2.54.14 PM.png>
> _______________________________________________
> 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