Hi,
I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac. For example, if you run the code below in a Moose image, and then press Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment. | 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 To get it 100% useable I would need help with some Morphic magic: - to make the Watcher window not appear in the taskbar - to make the rendering of Watcher happen in another thread so that it does not block the current UI Cheers, Doru _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Tudor Girba wrote:
> Hi, > > I enhanced Glamour with a first version of a Watcher browser that offers a > behavior similar to Quick Preview on Mac. > > For example, if you run the code below in a Moose image, and then press > Ctrl+Shift+Space you will get a preview of source code in a window floating > above the current one. See the attachment. > > | 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 > > > To get it 100% useable I would need help with some Morphic magic: > - to make the Watcher window not appear in the taskbar > - to make the rendering of Watcher happen in another thread so that it does not > block the current UI > > > Cheers, > Doru > > 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 _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Did you press Ctrl+Shift+Space?
This should open/close the Watcher. Cheers, Doru On 23 May 2012, at 17:21, Ben Coman wrote: > Tudor Girba wrote: >> Hi, >> >> I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac. >> >> For example, if you run the code below in a Moose image, and then press Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment. >> >> | 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 >> >> To get it 100% useable I would need help with some Morphic magic: >> - to make the Watcher window not appear in the taskbar >> - to make the rendering of Watcher happen in another thread so that it does not block the current UI >> >> >> Cheers, >> Doru >> >> > > 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 > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Every successful trip needs a suitable vehicle." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Yes. Ctrl+Shift+Space has no response. Else I would not have reported
it :)
btw my platform is Windows 7. Tudor Girba wrote: Did you press Ctrl+Shift+Space? This should open/close the Watcher. Cheers, Doru On 23 May 2012, at 17:21, Ben Coman wrote:Tudor Girba wrote:Hi, I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac. For example, if you run the code below in a Moose image, and then press Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment. | 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 To get it 100% useable I would need help with some Morphic magic: - to make the Watcher window not appear in the taskbar - to make the rendering of Watcher happen in another thread so that it does not block the current UI Cheers, DoruThis 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 _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev-- www.tudorgirba.com "Every successful trip needs a suitable vehicle." _______________________________________________ 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 |
Hi,
Perhaps the problem is with keymapping. I work on Mac. Please try to use: GLMWatcherWindow uniqueInstance toggleOpen This is what essentially gets triggered by the keymapping definition from: GLMWatcherWindow class>>buildKeymapsOn: Please let me know if it works. Cheers, Doru On 23 May 2012, at 19:08, Ben Coman wrote: > Yes. Ctrl+Shift+Space has no response. Else I would not have reported it :) > btw my platform is Windows 7. > > Tudor Girba wrote: >> Did you press Ctrl+Shift+Space? >> >> This should open/close the Watcher. >> >> Cheers, >> Doru >> >> >> On 23 May 2012, at 17:21, Ben Coman wrote: >> >> >> >>> Tudor Girba wrote: >>> >>> >>>> Hi, >>>> >>>> I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac. >>>> >>>> For example, if you run the code below in a Moose image, and then press Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment. >>>> >>>> | 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 >>>> >>>> To get it 100% useable I would need help with some Morphic magic: >>>> - to make the Watcher window not appear in the taskbar >>>> - to make the rendering of Watcher happen in another thread so that it does not block the current UI >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> >>>> >>>> >>> 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 >>> _______________________________________________ >>> Moose-dev mailing list >>> >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> >>> >> >> -- >> >> www.tudorgirba.com >> >> >> "Every successful trip needs a suitable vehicle." >> >> >> >> >> >> _______________________________________________ >> 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 -- www.tudorgirba.com If you can't say why something is relevant, it probably isn't. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Tudor Girba-2
Excellent
Can the window be permanent? Stef On May 22, 2012, at 11:20 PM, Tudor Girba wrote: > Hi, > > I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac. > > For example, if you run the code below in a Moose image, and then press Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment. > > | 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 > > > To get it 100% useable I would need help with some Morphic magic: > - to make the Watcher window not appear in the taskbar > - to make the rendering of Watcher happen in another thread so that it does not block the current UI > > > Cheers, > Doru > > -- > www.tudorgirba.com > > "Not knowing how to do something is not an argument for how it cannot be done." > > <Screen Shot 2012-05-22 at 23.11.26.png> > _______________________________________________ > 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 |
Sure, it is the same behavior as on Mac. You toggle it with Ctrl+Shift+Space.
Doru On 23 May 2012, at 21:51, Stéphane Ducasse wrote: > Excellent > Can the window be permanent? > > Stef > > On May 22, 2012, at 11:20 PM, Tudor Girba wrote: > >> Hi, >> >> I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac. >> >> For example, if you run the code below in a Moose image, and then press Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment. >> >> | 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 >> >> >> To get it 100% useable I would need help with some Morphic magic: >> - to make the Watcher window not appear in the taskbar >> - to make the rendering of Watcher happen in another thread so that it does not block the current UI >> >> >> Cheers, >> Doru >> >> -- >> www.tudorgirba.com >> >> "Not knowing how to do something is not an argument for how it cannot be done." >> >> <Screen Shot 2012-05-22 at 23.11.26.png> >> _______________________________________________ >> 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 -- www.tudorgirba.com Innovation comes in least expected form. That is, if it is expected, it already happened. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Tudor Girba-2
Tudor Girba wrote:
that worksHi, Perhaps the problem is with keymapping. I work on Mac. Please try to use: GLMWatcherWindow uniqueInstance toggleOpen This is what essentially gets triggered by the keymapping definition from: GLMWatcherWindow class>>buildKeymapsOn: Please let me know if it works. Cheers, Doru On 23 May 2012, at 19:08, Ben Coman wrote:Yes. Ctrl+Shift+Space has no response. Else I would not have reported it :) btw my platform is Windows 7. Tudor Girba wrote:Did you press Ctrl+Shift+Space? This should open/close the Watcher. Cheers, Doru On 23 May 2012, at 17:21, Ben Coman wrote:Tudor Girba wrote:Hi, I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac. For example, if you run the code below in a Moose image, and then press Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment. | 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 To get it 100% useable I would need help with some Morphic magic: - to make the Watcher window not appear in the taskbar - to make the rendering of Watcher happen in another thread so that it does not block the current UI Cheers, DoruThis 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 _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev-- www.tudorgirba.com "Every successful trip needs a suitable vehicle." _______________________________________________ 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-- www.tudorgirba.com If you can't say why something is relevant, it probably isn't. _______________________________________________ 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 |
In reply to this post by Tudor Girba-2
Hi!
I'd like to know also if the problem is in Keymapping or in is some platform/vm/whatever other issue on keyboard handling. Actually, pharo messes up with <ctrl> normally, since it is not broadly used :). Ben, can you debug a bit? Add the following lines on InputEventSensor>>#processEvent::    "Finally keyboard"    type = EventTypeKeyboard       ifTrue: [          "Sswap ctrl/alt keys if neeeded"          (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: 'Before: ', (evt asString);cr] .          KeyDecodeTable             at: {evt at: 3. evt at: 5}             ifPresent: [:a |                evt                   at: 3 put: a first;                   at: 5 put: a second].          (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: 'After: ', (evt asString);cr] .          "Update state for polling calls"          modifiers := evt at: 5.          ^evt]. press ctrl-shift-space and send me the output transcript :). BTW, if the problem is this f*** KeyDecodeTable, we have removed it in pharo 2.0, for the next generation :). Guille On Wed, May 23, 2012 at 9:05 PM, Tudor Girba <[hidden email]> wrote: Hi, _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Thanks for checking this out Guillermo. A few results...
Pressing CTRL on its own three times Before: #(2 533101358 17 1 2 17 0 1) Before: #(2 533103168 17 1 2 17 0 1) Before: #(2 533106007 17 1 2 17 0 1) First holding CTRL, then pressing SHIFT three times Before: #(2 533340445 17 1 2 17 0 1) Before: #(2 533341631 16 2 2 16 0 1) Before: #(2 533343206 16 2 2 16 0 1) Before: #(2 533345781 16 2 2 16 0 1) First holding CTRL, then pressing SPACE three times Before: #(2 533407619 17 1 2 17 0 1) Before: #(2 533409523 32 1 2 32 0 1) After: #(2 533409523 32 1 2 32 0 1) Before: #(2 533409523 32 0 2 32 0 1) After: #(2 533409523 32 0 2 32 0 1) Before: #(2 533409585 32 2 2 32 0 1) After: #(2 533409585 32 2 2 32 0 1) Before: #(2 533410677 32 1 2 32 0 1) After: #(2 533410677 32 1 2 32 0 1) Before: #(2 533410677 32 0 2 32 0 1) After: #(2 533410677 32 0 2 32 0 1) Before: #(2 533410708 32 2 2 32 0 1) After: #(2 533410708 32 2 2 32 0 1) Before: #(2 533411707 32 1 2 32 0 1) After: #(2 533411707 32 1 2 32 0 1) Before: #(2 533411707 32 0 2 32 0 1) After: #(2 533411707 32 0 2 32 0 1) Before: #(2 533411753 32 2 2 32 0 1) After: #(2 533411753 32 2 2 32 0 1) First holding CTRL, then holding SHIFT, then pressing SPACE three times Before: #(2 533487835 17 1 2 17 0 1) (nothing) (nothing) (nothing) First holding space, then pressing CTRL three times (nothing) Before: #(2 533197611 17 1 2 17 0 1) Before: #(2 533198250 17 1 2 17 0 1) Before: #(2 533200871 17 1 2 17 0 1) First holding SHIFT, then pressing CTRL three times (nothing) (nothing) (nothing) First holding SHIFT, then holding SPACE, then pressing CTRL three times (nothing) (nothing) (nothing) CogVM.ini [Global] DeferUpdate=1 ShowConsole=0 DynamicConsole=1 ReduceCPUUsage=1 ReduceCPUInBackground=0 3ButtonMouse=0 1ButtonMouse=0 UseDirectSound=1 PriorityBoost=1 B3DXUsesOpenGL=0 CaseSensitiveFileMode=0 Guillermo Polito wrote: Hi! I'd like to know also if the problem is in Keymapping or in is some platform/vm/whatever other issue on keyboard handling. Actually, pharo messes up with <ctrl> normally, since it is not broadly used :). Ben, can you debug a bit? Add the following lines on InputEventSensor>>#processEvent:: "Finally keyboard" type = EventTypeKeyboard ifTrue: [ "Sswap ctrl/alt keys if neeeded" * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: 'Before: ', (evt asString);cr] .* KeyDecodeTable at: {evt at: 3. evt at: 5} ifPresent: [:a | evt at: 3 put: a first; at: 5 put: a second]. * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: 'After: ', (evt asString);cr] .* "Update state for polling calls" modifiers := evt at: 5. ^evt]. press ctrl-shift-space and send me the output transcript :). BTW, if the problem is this f*** KeyDecodeTable, we have removed it in pharo 2.0, for the next generation :). Guille On Wed, May 23, 2012 at 9:05 PM, Tudor Girba [hidden email] wrote:Hi, Perhaps the problem is with keymapping. I work on Mac. Please try to use: GLMWatcherWindow uniqueInstance toggleOpen This is what essentially gets triggered by the keymapping definition from: GLMWatcherWindow class>>buildKeymapsOn: Please let me know if it works. Cheers, Doru On 23 May 2012, at 19:08, Ben Coman wrote:Yes. Ctrl+Shift+Space has no response. Else I would not have reportedit :)btw my platform is Windows 7. Tudor Girba wrote:Did you press Ctrl+Shift+Space? This should open/close the Watcher. Cheers, Doru On 23 May 2012, at 17:21, Ben Coman wrote:Tudor Girba wrote:Hi, I enhanced Glamour with a first version of a Watcher browser thatoffers a behavior similar to Quick Preview on Mac.For example, if you run the code below in a Moose image, and thenpress Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment.| 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 | asmalltalkCodesmalltalkClass: [ :method | method methodClass ]; display: [:method | method getSource ] ]. browser openOn: GLMBrowser To get it 100% useable I would need help with some Morphic magic: - to make the Watcher window not appear in the taskbar - to make the rendering of Watcher happen in another thread so thatit does not block the current UICheers, DoruThis does not work for me out of the box with a fresh Moose 4.7downloaded this evening. There is no response when clicking on the method list.I see in GLMMorphicWatcherRender>>actOnMatchingPresentationsChangedthat 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 (likelyinappropriate) 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 GlamorousWatcher. However Glamorous Watcher keeps repositioning on top of the Glamorous Browser.cheers -ben _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev-- www.tudorgirba.com "Every successful trip needs a suitable vehicle." _______________________________________________ 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-- www.tudorgirba.com If you can't say why something is relevant, it probably isn't. _______________________________________________ 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 |
Ok,
The lack of "after" means that there is some mapping configured that transforms the keyboard combination to some other without ctrl. The noBefore+noAfter may mean one of: - the os/vm is not sending a keyboard event to the image - the os/vm is sending some event that has no ctrl... So, probably a solution for now, may be picking a different key combination working on every platform... Guille On Fri, May 25, 2012 at 9:53 AM, Ben Coman <[hidden email]> wrote:
In unix it gives: Before: #(2 44327 251 2 2 0 0 1) After:Â Â #(2 44327 251 2 2 0 0 1) Before: #(2 44861 251 2 2 0 0 1) After: Â #(2 44861 251 2 2 0 0 1) Before: #(2 45309 251 2 2 0 0 1) After:Â Â #(2 45309 251 2 2 0 0 1) Â
In Unix Before: #(2 73761 255 1 2 0 0 1) After: Â #(2 73761 255 1 2 0 0 1) Before: #(2 74277 255 1 2 0 0 1) After: Â #(2 74277 255 1 2 0 0 1) Before: #(2 74785 255 1 2 0 0 1) After:Â Â #(2 74785 255 1 2 0 0 1) Â
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Thanks.
I now changed it to be: Character space command shift Ben, could you please try on Windows? (you have to load the latest version of Glamour-Morphic-Widgets) Cheers, Doru On 25 May 2012, at 12:37, Guillermo Polito wrote: > Ok, > > The lack of "after" means that there is some mapping configured that transforms the keyboard combination to some other without ctrl. > > The noBefore+noAfter may mean one of: > - the os/vm is not sending a keyboard event to the image > - the os/vm is sending some event that has no ctrl... > > So, probably a solution for now, may be picking a different key combination working on every platform... > > Guille > > On Fri, May 25, 2012 at 9:53 AM, Ben Coman <[hidden email]> wrote: > Thanks for checking this out Guillermo. A few results... > > Pressing CTRL on its own three times > Before: #(2 533101358 17 1 2 17 0 1) > Before: #(2 533103168 17 1 2 17 0 1) > Before: #(2 533106007 17 1 2 17 0 1) > > In unix it gives: > > Before: #(2 44327 251 2 2 0 0 1) > After: #(2 44327 251 2 2 0 0 1) > Before: #(2 44861 251 2 2 0 0 1) > After: #(2 44861 251 2 2 0 0 1) > Before: #(2 45309 251 2 2 0 0 1) > After: #(2 45309 251 2 2 0 0 1) > > > > First holding CTRL, then pressing SHIFT three times > Before: #(2 533340445 17 1 2 17 0 1) > Before: #(2 533341631 16 2 2 16 0 1) > Before: #(2 533343206 16 2 2 16 0 1) > Before: #(2 533345781 16 2 2 16 0 1) > > In Unix > > Before: #(2 73761 255 1 2 0 0 1) > After: #(2 73761 255 1 2 0 0 1) > Before: #(2 74277 255 1 2 0 0 1) > After: #(2 74277 255 1 2 0 0 1) > Before: #(2 74785 255 1 2 0 0 1) > After: #(2 74785 255 1 2 0 0 1) > > > First holding CTRL, then pressing SPACE three times > Before: #(2 533407619 17 1 2 17 0 1) > > Before: #(2 533409523 32 1 2 32 0 1) > After: #(2 533409523 32 1 2 32 0 1) > Before: #(2 533409523 32 0 2 32 0 1) > After: #(2 533409523 32 0 2 32 0 1) > Before: #(2 533409585 32 2 2 32 0 1) > After: #(2 533409585 32 2 2 32 0 1) > > Before: #(2 533410677 32 1 2 32 0 1) > After: #(2 533410677 32 1 2 32 0 1) > Before: #(2 533410677 32 0 2 32 0 1) > After: #(2 533410677 32 0 2 32 0 1) > Before: #(2 533410708 32 2 2 32 0 1) > After: #(2 533410708 32 2 2 32 0 1) > > Before: #(2 533411707 32 1 2 32 0 1) > After: #(2 533411707 32 1 2 32 0 1) > Before: #(2 533411707 32 0 2 32 0 1) > After: #(2 533411707 32 0 2 32 0 1) > Before: #(2 533411753 32 2 2 32 0 1) > After: #(2 533411753 32 2 2 32 0 1) > > > First holding CTRL, then holding SHIFT, then pressing SPACE three times > Before: #(2 533487835 17 1 2 17 0 1) > (nothing) > (nothing) > (nothing) > > > First holding space, then pressing CTRL three times > (nothing) > Before: #(2 533197611 17 1 2 17 0 1) > Before: #(2 533198250 17 1 2 17 0 1) > Before: #(2 533200871 17 1 2 17 0 1) > > > First holding SHIFT, then pressing CTRL three times > (nothing) > (nothing) > (nothing) > > > First holding SHIFT, then holding SPACE, then pressing CTRL three times > (nothing) > (nothing) > (nothing) > > > CogVM.ini > [Global] > DeferUpdate=1 > ShowConsole=0 > DynamicConsole=1 > ReduceCPUUsage=1 > ReduceCPUInBackground=0 > 3ButtonMouse=0 > 1ButtonMouse=0 > UseDirectSound=1 > PriorityBoost=1 > B3DXUsesOpenGL=0 > CaseSensitiveFileMode=0 > > > Guillermo Polito wrote: >> Hi! >> >> I'd like to know also if the problem is in Keymapping or in is some >> platform/vm/whatever other issue on keyboard handling. Actually, pharo >> messes up with <ctrl> normally, since it is not broadly used :). >> >> Ben, can you debug a bit? >> >> Add the following lines on InputEventSensor>># >> >> processEvent:: >> >> "Finally keyboard" >> type = EventTypeKeyboard >> ifTrue: [ >> "Sswap ctrl/alt keys if neeeded" >> * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: >> 'Before: ', (evt asString);cr] .* >> KeyDecodeTable >> at: {evt at: 3. evt at: 5} >> ifPresent: [:a | >> evt >> at: 3 put: a first; >> at: 5 put: a second]. >> * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: >> 'After: ', (evt asString);cr] .* >> "Update state for polling calls" >> modifiers := evt at: 5. >> ^evt]. >> >> press ctrl-shift-space and send me the output transcript :). >> >> BTW, if the problem is this f*** KeyDecodeTable, we have removed it in >> pharo 2.0, for the next generation :). >> Guille >> >> On Wed, May 23, 2012 at 9:05 PM, Tudor Girba >> <[hidden email]> >> wrote: >> >> >> >>> Hi, >>> >>> Perhaps the problem is with keymapping. I work on Mac. >>> >>> Please try to use: >>> GLMWatcherWindow uniqueInstance toggleOpen >>> >>> This is what essentially gets triggered by the keymapping definition from: >>> GLMWatcherWindow class>>buildKeymapsOn: >>> >>> Please let me know if it works. >>> >>> Cheers, >>> Doru >>> >>> >>> >>> >>> On 23 May 2012, at 19:08, Ben Coman wrote: >>> >>> >>> >>>> Yes. Ctrl+Shift+Space has no response. Else I would not have reported >>>> >>>> >>> it :) >>> >>> >>>> btw my platform is Windows 7. >>>> >>>> Tudor Girba wrote: >>>> >>>> >>>>> Did you press Ctrl+Shift+Space? >>>>> >>>>> This should open/close the Watcher. >>>>> >>>>> Cheers, >>>>> Doru >>>>> >>>>> >>>>> On 23 May 2012, at 17:21, Ben Coman wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> Tudor Girba wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I enhanced Glamour with a first version of a Watcher browser that >>>>>>> >>>>>>> >>> offers a behavior similar to Quick Preview on Mac. >>> >>> >>>>>>> For example, if you run the code below in a Moose image, and then >>>>>>> >>>>>>> >>> press Ctrl+Shift+Space you will get a preview of source code in a window >>> floating above the current one. See the attachment. >>> >>> >>>>>>> | 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 >>>>>>> >>>>>>> To get it 100% useable I would need help with some Morphic magic: >>>>>>> - to make the Watcher window not appear in the taskbar >>>>>>> - to make the rendering of Watcher happen in another thread so that >>>>>>> >>>>>>> >>> it does not block the current UI >>> >>> >>>>>>> Cheers, >>>>>>> Doru >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> 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 >>>>>> _______________________________________________ >>>>>> Moose-dev mailing list >>>>>> >>>>>> >>>>>> [hidden email] >>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> -- >>>>> >>>>> >>>>> www.tudorgirba.com >>>>> >>>>> >>>>> >>>>> "Every successful trip needs a suitable vehicle." >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> >>> -- >>> >>> www.tudorgirba.com >>> >>> >>> If you can't say why something is relevant, >>> it probably isn't. >>> >>> >>> _______________________________________________ >>> 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 >> >> >> > > > _______________________________________________ > 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 -- www.tudorgirba.com "Quality cannot be an afterthought." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
After loading the following into a fresh moose image...
Glamour-Morphic-Widgets-TudorGirba.45 Glamour-Morphic-Theme-TudorGirba.57 ...it now works on Window 7 using <ALT-SHIFT-SPACE> cheers, Ben Tudor Girba wrote: Thanks. I now changed it to be: Character space command shift Ben, could you please try on Windows? (you have to load the latest version of Glamour-Morphic-Widgets) Cheers, Doru On 25 May 2012, at 12:37, Guillermo Polito wrote:Ok, The lack of "after" means that there is some mapping configured that transforms the keyboard combination to some other without ctrl. The noBefore+noAfter may mean one of: - the os/vm is not sending a keyboard event to the image - the os/vm is sending some event that has no ctrl... So, probably a solution for now, may be picking a different key combination working on every platform... Guille On Fri, May 25, 2012 at 9:53 AM, Ben Coman [hidden email] wrote: Thanks for checking this out Guillermo. A few results... Pressing CTRL on its own three times Before: #(2 533101358 17 1 2 17 0 1) Before: #(2 533103168 17 1 2 17 0 1) Before: #(2 533106007 17 1 2 17 0 1) In unix it gives: Before: #(2 44327 251 2 2 0 0 1) After: #(2 44327 251 2 2 0 0 1) Before: #(2 44861 251 2 2 0 0 1) After: #(2 44861 251 2 2 0 0 1) Before: #(2 45309 251 2 2 0 0 1) After: #(2 45309 251 2 2 0 0 1) First holding CTRL, then pressing SHIFT three times Before: #(2 533340445 17 1 2 17 0 1) Before: #(2 533341631 16 2 2 16 0 1) Before: #(2 533343206 16 2 2 16 0 1) Before: #(2 533345781 16 2 2 16 0 1) In Unix Before: #(2 73761 255 1 2 0 0 1) After: #(2 73761 255 1 2 0 0 1) Before: #(2 74277 255 1 2 0 0 1) After: #(2 74277 255 1 2 0 0 1) Before: #(2 74785 255 1 2 0 0 1) After: #(2 74785 255 1 2 0 0 1) First holding CTRL, then pressing SPACE three times Before: #(2 533407619 17 1 2 17 0 1) Before: #(2 533409523 32 1 2 32 0 1) After: #(2 533409523 32 1 2 32 0 1) Before: #(2 533409523 32 0 2 32 0 1) After: #(2 533409523 32 0 2 32 0 1) Before: #(2 533409585 32 2 2 32 0 1) After: #(2 533409585 32 2 2 32 0 1) Before: #(2 533410677 32 1 2 32 0 1) After: #(2 533410677 32 1 2 32 0 1) Before: #(2 533410677 32 0 2 32 0 1) After: #(2 533410677 32 0 2 32 0 1) Before: #(2 533410708 32 2 2 32 0 1) After: #(2 533410708 32 2 2 32 0 1) Before: #(2 533411707 32 1 2 32 0 1) After: #(2 533411707 32 1 2 32 0 1) Before: #(2 533411707 32 0 2 32 0 1) After: #(2 533411707 32 0 2 32 0 1) Before: #(2 533411753 32 2 2 32 0 1) After: #(2 533411753 32 2 2 32 0 1) First holding CTRL, then holding SHIFT, then pressing SPACE three times Before: #(2 533487835 17 1 2 17 0 1) (nothing) (nothing) (nothing) First holding space, then pressing CTRL three times (nothing) Before: #(2 533197611 17 1 2 17 0 1) Before: #(2 533198250 17 1 2 17 0 1) Before: #(2 533200871 17 1 2 17 0 1) First holding SHIFT, then pressing CTRL three times (nothing) (nothing) (nothing) First holding SHIFT, then holding SPACE, then pressing CTRL three times (nothing) (nothing) (nothing) CogVM.ini [Global] DeferUpdate=1 ShowConsole=0 DynamicConsole=1 ReduceCPUUsage=1 ReduceCPUInBackground=0 3ButtonMouse=0 1ButtonMouse=0 UseDirectSound=1 PriorityBoost=1 B3DXUsesOpenGL=0 CaseSensitiveFileMode=0 Guillermo Polito wrote:Hi! I'd like to know also if the problem is in Keymapping or in is some platform/vm/whatever other issue on keyboard handling. Actually, pharo messes up with <ctrl> normally, since it is not broadly used :). Ben, can you debug a bit? Add the following lines on InputEventSensor>># processEvent:: "Finally keyboard" type = EventTypeKeyboard ifTrue: [ "Sswap ctrl/alt keys if neeeded" * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: 'Before: ', (evt asString);cr] .* KeyDecodeTable at: {evt at: 3. evt at: 5} ifPresent: [:a | evt at: 3 put: a first; at: 5 put: a second]. * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: 'After: ', (evt asString);cr] .* "Update state for polling calls" modifiers := evt at: 5. ^evt]. press ctrl-shift-space and send me the output transcript :). BTW, if the problem is this f*** KeyDecodeTable, we have removed it in pharo 2.0, for the next generation :). Guille On Wed, May 23, 2012 at 9:05 PM, Tudor Girba [hidden email] wrote:Hi, Perhaps the problem is with keymapping. I work on Mac. Please try to use: GLMWatcherWindow uniqueInstance toggleOpen This is what essentially gets triggered by the keymapping definition from: GLMWatcherWindow class>>buildKeymapsOn: Please let me know if it works. Cheers, Doru On 23 May 2012, at 19:08, Ben Coman wrote:Yes. Ctrl+Shift+Space has no response. Else I would not have reportedit :)btw my platform is Windows 7. Tudor Girba wrote:Did you press Ctrl+Shift+Space? This should open/close the Watcher. Cheers, Doru On 23 May 2012, at 17:21, Ben Coman wrote:Tudor Girba wrote:Hi, I enhanced Glamour with a first version of a Watcher browser thatoffers a behavior similar to Quick Preview on Mac.For example, if you run the code below in a Moose image, and thenpress Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment.| 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 | asmalltalkCodesmalltalkClass: [ :method | method methodClass ]; display: [:method | method getSource ] ]. browser openOn: GLMBrowser To get it 100% useable I would need help with some Morphic magic: - to make the Watcher window not appear in the taskbar - to make the rendering of Watcher happen in another thread so thatit does not block the current UICheers, DoruThis does not work for me out of the box with a fresh Moose 4.7downloaded this evening. There is no response when clicking on the method list.I see in GLMMorphicWatcherRender>>actOnMatchingPresentationsChangedthat 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 (likelyinappropriate) 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 GlamorousWatcher. However Glamorous Watcher keeps repositioning on top of the Glamorous Browser.cheers -ben _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev-- www.tudorgirba.com "Every successful trip needs a suitable vehicle." _______________________________________________ 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-- www.tudorgirba.com If you can't say why something is relevant, it probably isn't. _______________________________________________ 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_______________________________________________ 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-- www.tudorgirba.com "Quality cannot be an afterthought." _______________________________________________ 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 |
Excellent! We leave it like this.
And now, I still did not hear if you like it :) Cheers, Doru On 25 May 2012, at 18:28, Ben Coman wrote: > After loading the following into a fresh moose image... > Glamour-Morphic-Widgets-TudorGirba.45 > Glamour-Morphic-Theme-TudorGirba.57 > > ...it now works on Window 7 using <ALT-SHIFT-SPACE> > > cheers, Ben > > > Tudor Girba wrote: >> Thanks. >> >> I now changed it to be: >> Character space command shift >> >> Ben, could you please try on Windows? >> (you have to load the latest version of Glamour-Morphic-Widgets) >> >> Cheers, >> Doru >> >> >> On 25 May 2012, at 12:37, Guillermo Polito wrote: >> >> >> >>> Ok, >>> >>> The lack of "after" means that there is some mapping configured that transforms the keyboard combination to some other without ctrl. >>> >>> The noBefore+noAfter may mean one of: >>> - the os/vm is not sending a keyboard event to the image >>> - the os/vm is sending some event that has no ctrl... >>> >>> So, probably a solution for now, may be picking a different key combination working on every platform... >>> >>> Guille >>> >>> On Fri, May 25, 2012 at 9:53 AM, Ben Coman >>> <[hidden email]> >>> wrote: >>> Thanks for checking this out Guillermo. A few results... >>> >>> Pressing CTRL on its own three times >>> Before: #(2 533101358 17 1 2 17 0 1) >>> Before: #(2 533103168 17 1 2 17 0 1) >>> Before: #(2 533106007 17 1 2 17 0 1) >>> >>> In unix it gives: >>> >>> Before: #(2 44327 251 2 2 0 0 1) >>> After: #(2 44327 251 2 2 0 0 1) >>> Before: #(2 44861 251 2 2 0 0 1) >>> After: #(2 44861 251 2 2 0 0 1) >>> Before: #(2 45309 251 2 2 0 0 1) >>> After: #(2 45309 251 2 2 0 0 1) >>> >>> >>> >>> First holding CTRL, then pressing SHIFT three times >>> Before: #(2 533340445 17 1 2 17 0 1) >>> Before: #(2 533341631 16 2 2 16 0 1) >>> Before: #(2 533343206 16 2 2 16 0 1) >>> Before: #(2 533345781 16 2 2 16 0 1) >>> >>> In Unix >>> >>> Before: #(2 73761 255 1 2 0 0 1) >>> After: #(2 73761 255 1 2 0 0 1) >>> Before: #(2 74277 255 1 2 0 0 1) >>> After: #(2 74277 255 1 2 0 0 1) >>> Before: #(2 74785 255 1 2 0 0 1) >>> After: #(2 74785 255 1 2 0 0 1) >>> >>> >>> First holding CTRL, then pressing SPACE three times >>> Before: #(2 533407619 17 1 2 17 0 1) >>> >>> Before: #(2 533409523 32 1 2 32 0 1) >>> After: #(2 533409523 32 1 2 32 0 1) >>> Before: #(2 533409523 32 0 2 32 0 1) >>> After: #(2 533409523 32 0 2 32 0 1) >>> Before: #(2 533409585 32 2 2 32 0 1) >>> After: #(2 533409585 32 2 2 32 0 1) >>> >>> Before: #(2 533410677 32 1 2 32 0 1) >>> After: #(2 533410677 32 1 2 32 0 1) >>> Before: #(2 533410677 32 0 2 32 0 1) >>> After: #(2 533410677 32 0 2 32 0 1) >>> Before: #(2 533410708 32 2 2 32 0 1) >>> After: #(2 533410708 32 2 2 32 0 1) >>> >>> Before: #(2 533411707 32 1 2 32 0 1) >>> After: #(2 533411707 32 1 2 32 0 1) >>> Before: #(2 533411707 32 0 2 32 0 1) >>> After: #(2 533411707 32 0 2 32 0 1) >>> Before: #(2 533411753 32 2 2 32 0 1) >>> After: #(2 533411753 32 2 2 32 0 1) >>> >>> >>> First holding CTRL, then holding SHIFT, then pressing SPACE three times >>> Before: #(2 533487835 17 1 2 17 0 1) >>> (nothing) >>> (nothing) >>> (nothing) >>> >>> >>> First holding space, then pressing CTRL three times >>> (nothing) >>> Before: #(2 533197611 17 1 2 17 0 1) >>> Before: #(2 533198250 17 1 2 17 0 1) >>> Before: #(2 533200871 17 1 2 17 0 1) >>> >>> >>> First holding SHIFT, then pressing CTRL three times >>> (nothing) >>> (nothing) >>> (nothing) >>> >>> >>> First holding SHIFT, then holding SPACE, then pressing CTRL three times >>> (nothing) >>> (nothing) >>> (nothing) >>> >>> >>> CogVM.ini >>> [Global] >>> DeferUpdate=1 >>> ShowConsole=0 >>> DynamicConsole=1 >>> ReduceCPUUsage=1 >>> ReduceCPUInBackground=0 >>> 3ButtonMouse=0 >>> 1ButtonMouse=0 >>> UseDirectSound=1 >>> PriorityBoost=1 >>> B3DXUsesOpenGL=0 >>> CaseSensitiveFileMode=0 >>> >>> >>> Guillermo Polito wrote: >>> >>> >>>> Hi! >>>> >>>> I'd like to know also if the problem is in Keymapping or in is some >>>> platform/vm/whatever other issue on keyboard handling. Actually, pharo >>>> messes up with <ctrl> normally, since it is not broadly used :). >>>> >>>> Ben, can you debug a bit? >>>> >>>> Add the following lines on InputEventSensor>># >>>> >>>> processEvent:: >>>> >>>> "Finally keyboard" >>>> type = EventTypeKeyboard >>>> ifTrue: [ >>>> "Sswap ctrl/alt keys if neeeded" >>>> * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: >>>> 'Before: ', (evt asString);cr] .* >>>> KeyDecodeTable >>>> at: {evt at: 3. evt at: 5} >>>> ifPresent: [:a | >>>> evt >>>> at: 3 put: a first; >>>> at: 5 put: a second]. >>>> * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: >>>> 'After: ', (evt asString);cr] .* >>>> "Update state for polling calls" >>>> modifiers := evt at: 5. >>>> ^evt]. >>>> >>>> press ctrl-shift-space and send me the output transcript :). >>>> >>>> BTW, if the problem is this f*** KeyDecodeTable, we have removed it in >>>> pharo 2.0, for the next generation :). >>>> Guille >>>> >>>> On Wed, May 23, 2012 at 9:05 PM, Tudor Girba >>>> >>>> <[hidden email]> >>>> >>>> wrote: >>>> >>>> >>>> >>>> >>>> >>>>> Hi, >>>>> >>>>> Perhaps the problem is with keymapping. I work on Mac. >>>>> >>>>> Please try to use: >>>>> GLMWatcherWindow uniqueInstance toggleOpen >>>>> >>>>> This is what essentially gets triggered by the keymapping definition from: >>>>> GLMWatcherWindow class>>buildKeymapsOn: >>>>> >>>>> Please let me know if it works. >>>>> >>>>> Cheers, >>>>> Doru >>>>> >>>>> >>>>> >>>>> >>>>> On 23 May 2012, at 19:08, Ben Coman wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> Yes. Ctrl+Shift+Space has no response. Else I would not have reported >>>>>> >>>>>> >>>>>> >>>>>> >>>>> it :) >>>>> >>>>> >>>>> >>>>> >>>>>> btw my platform is Windows 7. >>>>>> >>>>>> Tudor Girba wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Did you press Ctrl+Shift+Space? >>>>>>> >>>>>>> This should open/close the Watcher. >>>>>>> >>>>>>> Cheers, >>>>>>> Doru >>>>>>> >>>>>>> >>>>>>> On 23 May 2012, at 17:21, Ben Coman wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> Tudor Girba wrote: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> I enhanced Glamour with a first version of a Watcher browser that >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>> offers a behavior similar to Quick Preview on Mac. >>>>> >>>>> >>>>> >>>>> >>>>>>>>> For example, if you run the code below in a Moose image, and then >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>> press Ctrl+Shift+Space you will get a preview of source code in a window >>>>> floating above the current one. See the attachment. >>>>> >>>>> >>>>> >>>>> >>>>>>>>> | 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 >>>>>>>>> >>>>>>>>> To get it 100% useable I would need help with some Morphic magic: >>>>>>>>> - to make the Watcher window not appear in the taskbar >>>>>>>>> - to make the rendering of Watcher happen in another thread so that >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>> it does not block the current UI >>>>> >>>>> >>>>> >>>>> >>>>>>>>> Cheers, >>>>>>>>> Doru >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> 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 >>>>>>>> _______________________________________________ >>>>>>>> Moose-dev mailing list >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> [hidden email] >>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> www.tudorgirba.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> "Every successful trip needs a suitable vehicle." >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> -- >>>>> >>>>> >>>>> www.tudorgirba.com >>>>> >>>>> >>>>> >>>>> If you can't say why something is relevant, >>>>> it probably isn't. >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> >>>> >>>> >>>> >>> _______________________________________________ >>> 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 >>> >>> >>> >> >> -- >> >> www.tudorgirba.com >> >> >> "Quality cannot be an afterthought." >> >> >> _______________________________________________ >> 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 -- www.tudorgirba.com Things happen when they happen, not when you talk about them happening. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Yeap, Cmd is mapped as Alt in linux and windows by keymapping (even by the vm). Probably it needs to be enhanced, but is has not the higher priority in what shortcuts handling respects for pharo :).
Guille
On Fri, May 25, 2012 at 8:18 PM, Tudor Girba <[hidden email]> wrote: Excellent! We leave it like this. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Tudor Girba-2
> I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac.
In general I like it - however for those of us not familiar with the
Mac Quick Preview, can you describe some use-cases?Some possible enhancements... 1. Having a visible tip somewhere describing the shortcut <SHIFT-ALT-SPACE> to close it. Perhaps via a window menu. 2. I'm not sure I like that it always pops up relative to the last window I was in and always at the same size. Since the Watcher stays-on-top, it blocks out whatever context I was just involved in. Once I have resized and moved it to a convenient screen location, I would expect it to be in the same location each time it appears. 3. You might statically store the last ten contents and a shortcut can flip back and forth through them. This value might be settable via the window menu. cheers -ben Tudor Girba wrote: Excellent! We leave it like this. And now, I still did not hear if you like it :) Cheers, Doru On 25 May 2012, at 18:28, Ben Coman wrote:After loading the following into a fresh moose image... Glamour-Morphic-Widgets-TudorGirba.45 Glamour-Morphic-Theme-TudorGirba.57 ...it now works on Window 7 using <ALT-SHIFT-SPACE> cheers, Ben Tudor Girba wrote:Thanks. I now changed it to be: Character space command shift Ben, could you please try on Windows? (you have to load the latest version of Glamour-Morphic-Widgets) Cheers, Doru On 25 May 2012, at 12:37, Guillermo Polito wrote:Ok, The lack of "after" means that there is some mapping configured that transforms the keyboard combination to some other without ctrl. The noBefore+noAfter may mean one of: - the os/vm is not sending a keyboard event to the image - the os/vm is sending some event that has no ctrl... So, probably a solution for now, may be picking a different key combination working on every platform... Guille On Fri, May 25, 2012 at 9:53 AM, Ben Coman [hidden email] wrote: Thanks for checking this out Guillermo. A few results... Pressing CTRL on its own three times Before: #(2 533101358 17 1 2 17 0 1) Before: #(2 533103168 17 1 2 17 0 1) Before: #(2 533106007 17 1 2 17 0 1) In unix it gives: Before: #(2 44327 251 2 2 0 0 1) After: #(2 44327 251 2 2 0 0 1) Before: #(2 44861 251 2 2 0 0 1) After: #(2 44861 251 2 2 0 0 1) Before: #(2 45309 251 2 2 0 0 1) After: #(2 45309 251 2 2 0 0 1) First holding CTRL, then pressing SHIFT three times Before: #(2 533340445 17 1 2 17 0 1) Before: #(2 533341631 16 2 2 16 0 1) Before: #(2 533343206 16 2 2 16 0 1) Before: #(2 533345781 16 2 2 16 0 1) In Unix Before: #(2 73761 255 1 2 0 0 1) After: #(2 73761 255 1 2 0 0 1) Before: #(2 74277 255 1 2 0 0 1) After: #(2 74277 255 1 2 0 0 1) Before: #(2 74785 255 1 2 0 0 1) After: #(2 74785 255 1 2 0 0 1) First holding CTRL, then pressing SPACE three times Before: #(2 533407619 17 1 2 17 0 1) Before: #(2 533409523 32 1 2 32 0 1) After: #(2 533409523 32 1 2 32 0 1) Before: #(2 533409523 32 0 2 32 0 1) After: #(2 533409523 32 0 2 32 0 1) Before: #(2 533409585 32 2 2 32 0 1) After: #(2 533409585 32 2 2 32 0 1) Before: #(2 533410677 32 1 2 32 0 1) After: #(2 533410677 32 1 2 32 0 1) Before: #(2 533410677 32 0 2 32 0 1) After: #(2 533410677 32 0 2 32 0 1) Before: #(2 533410708 32 2 2 32 0 1) After: #(2 533410708 32 2 2 32 0 1) Before: #(2 533411707 32 1 2 32 0 1) After: #(2 533411707 32 1 2 32 0 1) Before: #(2 533411707 32 0 2 32 0 1) After: #(2 533411707 32 0 2 32 0 1) Before: #(2 533411753 32 2 2 32 0 1) After: #(2 533411753 32 2 2 32 0 1) First holding CTRL, then holding SHIFT, then pressing SPACE three times Before: #(2 533487835 17 1 2 17 0 1) (nothing) (nothing) (nothing) First holding space, then pressing CTRL three times (nothing) Before: #(2 533197611 17 1 2 17 0 1) Before: #(2 533198250 17 1 2 17 0 1) Before: #(2 533200871 17 1 2 17 0 1) First holding SHIFT, then pressing CTRL three times (nothing) (nothing) (nothing) First holding SHIFT, then holding SPACE, then pressing CTRL three times (nothing) (nothing) (nothing) CogVM.ini [Global] DeferUpdate=1 ShowConsole=0 DynamicConsole=1 ReduceCPUUsage=1 ReduceCPUInBackground=0 3ButtonMouse=0 1ButtonMouse=0 UseDirectSound=1 PriorityBoost=1 B3DXUsesOpenGL=0 CaseSensitiveFileMode=0 Guillermo Polito wrote:Hi! I'd like to know also if the problem is in Keymapping or in is some platform/vm/whatever other issue on keyboard handling. Actually, pharo messes up with <ctrl> normally, since it is not broadly used :). Ben, can you debug a bit? Add the following lines on InputEventSensor>># processEvent:: "Finally keyboard" type = EventTypeKeyboard ifTrue: [ "Sswap ctrl/alt keys if neeeded" * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: 'Before: ', (evt asString);cr] .* KeyDecodeTable at: {evt at: 3. evt at: 5} ifPresent: [:a | evt at: 3 put: a first; at: 5 put: a second]. * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: 'After: ', (evt asString);cr] .* "Update state for polling calls" modifiers := evt at: 5. ^evt]. press ctrl-shift-space and send me the output transcript :). BTW, if the problem is this f*** KeyDecodeTable, we have removed it in pharo 2.0, for the next generation :). Guille On Wed, May 23, 2012 at 9:05 PM, Tudor Girba [hidden email] wrote:Hi, Perhaps the problem is with keymapping. I work on Mac. Please try to use: GLMWatcherWindow uniqueInstance toggleOpen This is what essentially gets triggered by the keymapping definition from: GLMWatcherWindow class>>buildKeymapsOn: Please let me know if it works. Cheers, Doru On 23 May 2012, at 19:08, Ben Coman wrote:Yes. Ctrl+Shift+Space has no response. Else I would not have reportedit :)btw my platform is Windows 7. Tudor Girba wrote:Did you press Ctrl+Shift+Space? This should open/close the Watcher. Cheers, Doru On 23 May 2012, at 17:21, Ben Coman wrote:Tudor Girba wrote:Hi, I enhanced Glamour with a first version of a Watcher browser thatoffers a behavior similar to Quick Preview on Mac.For example, if you run the code below in a Moose image, and thenpress Ctrl+Shift+Space you will get a preview of source code in a window floating above the current one. See the attachment.| 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 | asmalltalkCodesmalltalkClass: [ :method | method methodClass ]; display: [:method | method getSource ] ]. browser openOn: GLMBrowser To get it 100% useable I would need help with some Morphic magic: - to make the Watcher window not appear in the taskbar - to make the rendering of Watcher happen in another thread so thatit does not block the current UICheers, DoruThis does not work for me out of the box with a fresh Moose 4.7downloaded this evening. There is no response when clicking on the method list.I see in GLMMorphicWatcherRender>>actOnMatchingPresentationsChangedthat 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 (likelyinappropriate) 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 GlamorousWatcher. However Glamorous Watcher keeps repositioning on top of the Glamorous Browser.cheers -ben _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev-- www.tudorgirba.com "Every successful trip needs a suitable vehicle." _______________________________________________ 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-- www.tudorgirba.com If you can't say why something is relevant, it probably isn't. _______________________________________________ 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_______________________________________________ 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-- www.tudorgirba.com "Quality cannot be an afterthought." _______________________________________________ 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-- www.tudorgirba.com Things happen when they happen, not when you talk about them happening. _______________________________________________ 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 |
Hi,
On 26 May 2012, at 14:50, Ben Coman wrote: > > I enhanced Glamour with a first version of a Watcher browser that offers a behavior similar to Quick Preview on Mac. > In general I like it - however for those of us not familiar with the Mac Quick Preview, can you describe some use-cases? For example, when in a FAMIX-related browser offer the source code of entities as a quick preview. In the example I showed in the original post, you could spawn the watcher and then continue using the arrows to navigate through the list of methods. > Some possible enhancements... > > 1. Having a visible tip somewhere describing the shortcut <SHIFT-ALT-SPACE> to close it. Perhaps via a window menu. You can also use the X to close the window :) > 2. I'm not sure I like that it always pops up relative to the last window I was in and always at the same size. Since the Watcher stays-on-top, it blocks out whatever context I was just involved in. Once I have resized and moved it to a convenient screen location, I would expect it to be in the same location each time it appears. It does appear in the last location you put into and with the size you last set it. Did you try the latest version? > 3. You might statically store the last ten contents and a shortcut can flip back and forth through them. This value might be settable via the window menu. Maybe. Cheers, Doru > cheers -ben > > Tudor Girba wrote: >> Excellent! We leave it like this. >> >> And now, I still did not hear if you like it :) >> >> Cheers, >> Doru >> >> >> >> On 25 May 2012, at 18:28, Ben Coman wrote: >> >> >> >>> After loading the following into a fresh moose image... >>> Glamour-Morphic-Widgets-TudorGirba.45 >>> Glamour-Morphic-Theme-TudorGirba.57 >>> >>> ...it now works on Window 7 using <ALT-SHIFT-SPACE> >>> >>> cheers, Ben >>> >>> >>> Tudor Girba wrote: >>> >>> >>>> Thanks. >>>> >>>> I now changed it to be: >>>> Character space command shift >>>> >>>> Ben, could you please try on Windows? >>>> (you have to load the latest version of Glamour-Morphic-Widgets) >>>> >>>> Cheers, >>>> Doru >>>> >>>> >>>> On 25 May 2012, at 12:37, Guillermo Polito wrote: >>>> >>>> >>>> >>>> >>>> >>>>> Ok, >>>>> >>>>> The lack of "after" means that there is some mapping configured that transforms the keyboard combination to some other without ctrl. >>>>> >>>>> The noBefore+noAfter may mean one of: >>>>> - the os/vm is not sending a keyboard event to the image >>>>> - the os/vm is sending some event that has no ctrl... >>>>> >>>>> So, probably a solution for now, may be picking a different key combination working on every platform... >>>>> >>>>> Guille >>>>> >>>>> On Fri, May 25, 2012 at 9:53 AM, Ben Coman >>>>> >>>>> <[hidden email]> >>>>> >>>>> wrote: >>>>> Thanks for checking this out Guillermo. A few results... >>>>> >>>>> Pressing CTRL on its own three times >>>>> Before: #(2 533101358 17 1 2 17 0 1) >>>>> Before: #(2 533103168 17 1 2 17 0 1) >>>>> Before: #(2 533106007 17 1 2 17 0 1) >>>>> >>>>> In unix it gives: >>>>> >>>>> Before: #(2 44327 251 2 2 0 0 1) >>>>> After: #(2 44327 251 2 2 0 0 1) >>>>> Before: #(2 44861 251 2 2 0 0 1) >>>>> After: #(2 44861 251 2 2 0 0 1) >>>>> Before: #(2 45309 251 2 2 0 0 1) >>>>> After: #(2 45309 251 2 2 0 0 1) >>>>> >>>>> >>>>> >>>>> First holding CTRL, then pressing SHIFT three times >>>>> Before: #(2 533340445 17 1 2 17 0 1) >>>>> Before: #(2 533341631 16 2 2 16 0 1) >>>>> Before: #(2 533343206 16 2 2 16 0 1) >>>>> Before: #(2 533345781 16 2 2 16 0 1) >>>>> >>>>> In Unix >>>>> >>>>> Before: #(2 73761 255 1 2 0 0 1) >>>>> After: #(2 73761 255 1 2 0 0 1) >>>>> Before: #(2 74277 255 1 2 0 0 1) >>>>> After: #(2 74277 255 1 2 0 0 1) >>>>> Before: #(2 74785 255 1 2 0 0 1) >>>>> After: #(2 74785 255 1 2 0 0 1) >>>>> >>>>> >>>>> First holding CTRL, then pressing SPACE three times >>>>> Before: #(2 533407619 17 1 2 17 0 1) >>>>> >>>>> Before: #(2 533409523 32 1 2 32 0 1) >>>>> After: #(2 533409523 32 1 2 32 0 1) >>>>> Before: #(2 533409523 32 0 2 32 0 1) >>>>> After: #(2 533409523 32 0 2 32 0 1) >>>>> Before: #(2 533409585 32 2 2 32 0 1) >>>>> After: #(2 533409585 32 2 2 32 0 1) >>>>> >>>>> Before: #(2 533410677 32 1 2 32 0 1) >>>>> After: #(2 533410677 32 1 2 32 0 1) >>>>> Before: #(2 533410677 32 0 2 32 0 1) >>>>> After: #(2 533410677 32 0 2 32 0 1) >>>>> Before: #(2 533410708 32 2 2 32 0 1) >>>>> After: #(2 533410708 32 2 2 32 0 1) >>>>> >>>>> Before: #(2 533411707 32 1 2 32 0 1) >>>>> After: #(2 533411707 32 1 2 32 0 1) >>>>> Before: #(2 533411707 32 0 2 32 0 1) >>>>> After: #(2 533411707 32 0 2 32 0 1) >>>>> Before: #(2 533411753 32 2 2 32 0 1) >>>>> After: #(2 533411753 32 2 2 32 0 1) >>>>> >>>>> >>>>> First holding CTRL, then holding SHIFT, then pressing SPACE three times >>>>> Before: #(2 533487835 17 1 2 17 0 1) >>>>> (nothing) >>>>> (nothing) >>>>> (nothing) >>>>> >>>>> >>>>> First holding space, then pressing CTRL three times >>>>> (nothing) >>>>> Before: #(2 533197611 17 1 2 17 0 1) >>>>> Before: #(2 533198250 17 1 2 17 0 1) >>>>> Before: #(2 533200871 17 1 2 17 0 1) >>>>> >>>>> >>>>> First holding SHIFT, then pressing CTRL three times >>>>> (nothing) >>>>> (nothing) >>>>> (nothing) >>>>> >>>>> >>>>> First holding SHIFT, then holding SPACE, then pressing CTRL three times >>>>> (nothing) >>>>> (nothing) >>>>> (nothing) >>>>> >>>>> >>>>> CogVM.ini >>>>> [Global] >>>>> DeferUpdate=1 >>>>> ShowConsole=0 >>>>> DynamicConsole=1 >>>>> ReduceCPUUsage=1 >>>>> ReduceCPUInBackground=0 >>>>> 3ButtonMouse=0 >>>>> 1ButtonMouse=0 >>>>> UseDirectSound=1 >>>>> PriorityBoost=1 >>>>> B3DXUsesOpenGL=0 >>>>> CaseSensitiveFileMode=0 >>>>> >>>>> >>>>> Guillermo Polito wrote: >>>>> >>>>> >>>>> >>>>> >>>>>> Hi! >>>>>> >>>>>> I'd like to know also if the problem is in Keymapping or in is some >>>>>> platform/vm/whatever other issue on keyboard handling. Actually, pharo >>>>>> messes up with <ctrl> normally, since it is not broadly used :). >>>>>> >>>>>> Ben, can you debug a bit? >>>>>> >>>>>> Add the following lines on InputEventSensor>># >>>>>> >>>>>> processEvent:: >>>>>> >>>>>> "Finally keyboard" >>>>>> type = EventTypeKeyboard >>>>>> ifTrue: [ >>>>>> "Sswap ctrl/alt keys if neeeded" >>>>>> * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: >>>>>> 'Before: ', (evt asString);cr] .* >>>>>> KeyDecodeTable >>>>>> at: {evt at: 3. evt at: 5} >>>>>> ifPresent: [:a | >>>>>> evt >>>>>> at: 3 put: a first; >>>>>> at: 5 put: a second]. >>>>>> * (evt at: 5) = 2 "if it is ctrl" ifTrue: [ Transcript show: >>>>>> 'After: ', (evt asString);cr] .* >>>>>> "Update state for polling calls" >>>>>> modifiers := evt at: 5. >>>>>> ^evt]. >>>>>> >>>>>> press ctrl-shift-space and send me the output transcript :). >>>>>> >>>>>> BTW, if the problem is this f*** KeyDecodeTable, we have removed it in >>>>>> pharo 2.0, for the next generation :). >>>>>> Guille >>>>>> >>>>>> On Wed, May 23, 2012 at 9:05 PM, Tudor Girba >>>>>> >>>>>> >>>>>> <[hidden email]> >>>>>> >>>>>> >>>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Perhaps the problem is with keymapping. I work on Mac. >>>>>>> >>>>>>> Please try to use: >>>>>>> GLMWatcherWindow uniqueInstance toggleOpen >>>>>>> >>>>>>> This is what essentially gets triggered by the keymapping definition from: >>>>>>> GLMWatcherWindow class>>buildKeymapsOn: >>>>>>> >>>>>>> Please let me know if it works. >>>>>>> >>>>>>> Cheers, >>>>>>> Doru >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 23 May 2012, at 19:08, Ben Coman wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> Yes. Ctrl+Shift+Space has no response. Else I would not have reported >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> it :) >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> btw my platform is Windows 7. >>>>>>>> >>>>>>>> Tudor Girba wrote: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> Did you press Ctrl+Shift+Space? >>>>>>>>> >>>>>>>>> This should open/close the Watcher. >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> Doru >>>>>>>>> >>>>>>>>> >>>>>>>>> On 23 May 2012, at 17:21, Ben Coman wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>> Tudor Girba wrote: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> I enhanced Glamour with a first version of a Watcher browser that >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>> offers a behavior similar to Quick Preview on Mac. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>>>>> For example, if you run the code below in a Moose image, and then >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>> press Ctrl+Shift+Space you will get a preview of source code in a window >>>>>>> floating above the current one. See the attachment. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>>>>> | 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 >>>>>>>>>>> >>>>>>>>>>> To get it 100% useable I would need help with some Morphic magic: >>>>>>>>>>> - to make the Watcher window not appear in the taskbar >>>>>>>>>>> - to make the rendering of Watcher happen in another thread so that >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>> it does not block the current UI >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>>>>> Cheers, >>>>>>>>>>> Doru >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> 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 >>>>>>>>>> _______________________________________________ >>>>>>>>>> Moose-dev mailing list >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> [hidden email] >>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> www.tudorgirba.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "Every successful trip needs a suitable vehicle." >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> www.tudorgirba.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> If you can't say why something is relevant, >>>>>>> it probably isn't. >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> -- >>>> >>>> >>>> www.tudorgirba.com >>>> >>>> >>>> >>>> "Quality cannot be an afterthought." >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> >> >> -- >> >> www.tudorgirba.com >> >> >> Things happen when they happen, >> not when you talk about them happening. >> >> >> _______________________________________________ >> 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 -- www.tudorgirba.com "From an abstract enough point of view, any two things are similar." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |