Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mondrian - broken popupText: #792

Closed
seandenigris opened this issue Aug 3, 2015 · 4 comments
Closed

Mondrian - broken popupText: #792

seandenigris opened this issue Aug 3, 2015 · 4 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 792


I have isolated what I assume is an issue introduced in ConfigurationOfMondrian-AlexandreBergel.332
with #popupText: 

Test Case to execute in Mondrian Easel...
    view interaction popupText: [ :es | 'popupText works'].
    view shape label.
    view node: 'node value'.

With a freshly unzipped Moose_Suite_4_6, 
hovering over the node displays a blue box that says 'popupText works'

Using Monticello Browser to load ConfigurationOfMondrian-AlexandreBergel.331 then doing
'(Smalltalk at: #ConfigurationOfMondrian) project lastVersion load'
has the same behaviour.

With Monticello Browser, loading ConfigurationOfMondrian-AlexandreBergel.332 then doing
'(Smalltalk at: #ConfigurationOfMondrian) project lastVersion load'
hovering over the node displays a white box that says 'node value'

This behaviour persists through to current 
ConfigurationOfMondrian-AlexandreBergel.348

The comment on 332 is: 2.147 : Pharo ground is seriously shaking those days... popupText:
does not use the Pharo popup, it instead uses popupView:

Platform: Windows 7

Reported by benjamin.t.coman on 2012-04-26 14:07:22

@seandenigris
Copy link
Contributor Author

MOAnnouncer>>popupView: aBlock delay: ms zoomedInBy: aSymbolOrABlock

aBlock is never used.

Reported by benjamin.t.coman on 2012-04-26 14:54:25

@seandenigris
Copy link
Contributor Author

This fixes it for me

MOAnnouncer>>popupText: aBlock delay: ms
    "open a popup text when the mouse enter a node"
    self popupView: 
        [ :el :myView |
            myView shape rectangle.
            myView node: 'popup' forIt: 
            [   | popupText |
                popupText := [aBlock value: el ] on: Error do: [ el asString ].
                myView shape label.
                myView node: popupText 
            ].
        ] delay: ms

but I think there is more to it than that. The equivalent from version "VeronicaUquillas
7/20/2011 11:07" had the following, but I can't get that to work myself...

ifTrue:[ MOPopup show: ([aBlock value: ann element source model value: ann element
target model ] on: Error do: [ [ (aBlock moValue: ann modelElement) asString ] on:
Error do: [ 'Error when printing' ] ])      


ifFalse:[ MOPopup show: ([ (aBlock moValue: ann modelElement) asString ] on: Error
do: [ 'Error when printing' ]) asString  ] 

Reported by benjamin.t.coman on 2012-04-26 15:23:43

@seandenigris
Copy link
Contributor Author

I have uploaded... Mondrian-Pharo-Morphic-BenComan.34 "Partial fix of MOAnnouncer>>popupText:
aBlock delay: ms for Issue 792.  "

The use of the temporary variable was for clarity, and might be removed upon review
- but shouldn't add much delay in terms of human reaction time :)

This works as expected displaying for 'node value' for the following...
    view interaction popupText: [ :es | |x| 1/0 ].
    view shape label.
    view node: 'node value'.

Reported by benjamin.t.coman on 2012-04-26 15:41:08

@seandenigris
Copy link
Contributor Author

Thanks. I will close the issue.

Reported by tudor@tudorgirba.com on 2012-09-10 06:12:41

  • Status changed: Fixed
  • Labels added: Component-Mondrian, Milestone-4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant