Playground and Dr. Geo

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

Playground and Dr. Geo

HilaireFernandes
Hi,

I am integrating the Dr. Geo Smalltalk Sketch to Playground.

So far, Dr. Geo morphic view is well integrated and interactive is
there. However when I select a menu in the view it opens deported. See
attached screenshot.

The Dr. Geo view is a StandardWindow with its label area hidden.

Any idea?

Thanks

Hilaire


--
Dr. Geo
http://drgeo.eu


DrGeoInPlayground.png (259K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Playground and Dr. Geo

Henrik-Nergaard

Hi,


a)Do you wrap the morph inside the morph tab view? ,

b) Do you use the same code for rendering as in  Morph>> #gtInspectorMorphIn: .


if a) it is most likely caused by the morph being wrapped within one or more transform morphs, and the offset of these are not taken into account when opening the menu.


if b) The real morph position is probably not the same as where clicked causing it to open at another place.


What method are you using for opening the menu: (#popUpEvent:in: , #popUpAt:forHand:in: , other)?

also see: https://pharo.fogbugz.com/f/cases/15927/Menu-is-broken-when-contained-in-a-scrollable-pane



Best regards,

Henrik



Fra: Pharo-users <[hidden email]> på vegne av Hilaire <[hidden email]>
Sendt: 16. juli 2017 21:12:16
Til: [hidden email]
Emne: [Pharo-users] Playground and Dr. Geo
 
Hi,

I am integrating the Dr. Geo Smalltalk Sketch to Playground.

So far, Dr. Geo morphic view is well integrated and interactive is
there. However when I select a menu in the view it opens deported. See
attached screenshot.

The Dr. Geo view is a StandardWindow with its label area hidden.

Any idea?

Thanks

Hilaire


--
Dr. Geo
http://drgeo.eu

Reply | Threaded
Open this post in threaded view
|

Re: Playground and Dr. Geo

HilaireFernandes
Hi,


Le 16/07/2017 à 22:02, Henrik Nergaard a écrit :
>
> a)Do you wrap the morph inside the morph tab view? ,
>

I don't understand.

> b) Do you use the same code for rendering as in  Morph>>
> #gtInspectorMorphIn: .
>

No, as I want a Morph view and not a From:

gtInspectorCanvasIn: composite
    <gtInspectorPresentationOrder: 90>
    | morphPresentation |
    morphPresentation := composite morph.
    morphPresentation
        title: 'Morph';
        display: [self view]

>
> if a) it is most likely caused by the morph being wrapped within one
> or more transform morphs, and the offset of these are not taken into
> account when opening the menu.
>
>
> if b) The real morph position is probably not the same as where
> clicked causing it to open at another place.
>
I guess so too.

> What method are you using for opening the menu: (#popUpEvent:in: ,
> #popUpAt:forHand:in: , other)?
>
The menu are opened with #popUpAdjacentTo:forHand:from:


Menu are instantiate as:

    menuBar := self window newToolDockingBar.
    menuBar
        add: 'File' translated
        font: self theme menuBarFont
        icon: nil
        help: 'Load, save or export Dr. Geo figure.' translated
        subMenu: self fileMenu.



> also
> see: https://pharo.fogbugz.com/f/cases/15927/Menu-is-broken-when-contained-in-a-scrollable-pane
>
>
Looks to be the same. But issue was closed so it should be ok, may be an
unrelated problem.


Hilaire

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Playground and Dr. Geo

HilaireFernandes
The owner of the menu (DockingBarToogleMenuItemMorph) does not have the
right bounds. Therefore its #adjacentTo message returns the wrong
information.


Le 17/07/2017 à 10:50, Hilaire a écrit :
>> if b) The real morph position is probably not the same as where
>> clicked causing it to open at another place.
>>
> I guess so too.
>

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Playground and Dr. Geo

webwarrior
In reply to this post by HilaireFernandes
HilaireFernandes wrote
...


> also
> see: https://pharo.fogbugz.com/f/cases/15927/Menu-is-broken-when-contained-in-a-scrollable-pane
>
>
Looks to be the same. But issue was closed so it should be ok, may be an
unrelated problem.


Hilaire

--
Dr. Geo
http://drgeo.eu
It is the same bug that you are talking about.

Issue was closed automatically, because of one year of inactivity.
I couldn't fix it because I'm not very familiar with Morphic internals, and worked my way around it.
Others didn't care much it seems.