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

Watcher support in Glamour #582

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

Watcher support in Glamour #582

seandenigris opened this issue Aug 3, 2015 · 3 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 582

Like we now have a statusbar, we should also have a detailed preview shown in a floating
Watcher window. The behavior would be similar to Quick Look on Mac.

Reported by tudor.girba on 2011-04-12 07:12:18

@seandenigris
Copy link
Contributor Author

A first version is available now.

For example try:

| browser |
browser := GLMTabulator new.
browser column: #methods.
browser transmit to: #methods; andShow: [:a | a list display: #methods; format: #selector
].
browser transmit from: #methods; toWatcher; andShow: [:a | 
    a smalltalkCode
        smalltalkClass: [ :method | method methodClass ];
        display: [:method | method getSource ] ].
browser openOn: GLMBrowser 

Reported by tudor.girba on 2012-05-22 21:12:55

  • Status changed: Fixed
  • Labels added: Milestone-4.7

@seandenigris
Copy link
Contributor Author

This does not work for me out of the box with a fresh Moose 4.7 downloaded this evening.
There is no response when clicking on the method list.

I see in GLMMorphicWatcherRender>>actOnMatchingPresentationsChanged that you use you
have [ GLMWatcherWindow uniqueInstance ] and a stab in the dark is that something broke
since your uniqueInstance was created.  I wonder your example still works for you after
[ GLMWatcherWindow reset ].

In any case, I got it partially working with the following (likely inappropriate) hack...
GLMMorphicWatcherRenderer>>actOnMatchingPresentationsChanged: anAnnouncement
   "whenever a relevant pane changes its presentations,
   we override the contents from the GLMWatcherWindow"
   | window |
   window := GLMWatcherWindow uniqueInstance.
   window contentsMorph
       removeAllMorphs;
       addMorph: (self renderObject: anAnnouncement pane)
       fullFrame: (LayoutFrame fractions: (0@0 corner: 1@1))    .
   window openInWorld.

Clicking in turn on several methods shows each in the single Glamorous Watcher.  However
Glamorous Watcher keeps repositioning on top of the Glamorous Browser.

cheers -ben 

Reported by benjamin.t.coman on 2012-05-23 15:33:59

@seandenigris
Copy link
Contributor Author

It should work :)

Reported by tudor.girba on 2012-05-23 16:23:32

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