you will probably need to hook in at
HandMorph>>newKeyboardFocus: On 22 May 2012 17:38, Hilaire Fernandes <[hidden email]> wrote: > Hello, > > I need to take an action when an arbitrary morph got the keyboard focus > (a text morph). > > How can I set up such an action for a given morph? > > Of course I don't want to override the given morph. Ideally I want to > pass a block of code to execute whenever the focus changes. > > Thanks > > Hilaire > > -- Best regards, Igor Stasenko. |
On May 22, 2012, at 6:39 PM, Hilaire Fernandes wrote: > I found I have to override #keyboardFocusChange:, but it is far from a > good solutions. Basicly I want to show/hide a virtual keyboard only for > text edit morph, and when I want it. I do not have the answer but this is important to have such scenario when we will start to modify Handmorph. Stef > > Thanks > > Hilaire > > Le 22/05/2012 18:15, Igor Stasenko a écrit : >> you will probably need to hook in at >> >> HandMorph>>newKeyboardFocus: >> >> On 22 May 2012 17:38, Hilaire Fernandes <[hidden email]> wrote: >>> Hello, >>> >>> I need to take an action when an arbitrary morph got the keyboard focus >>> (a text morph). >>> >>> How can I set up such an action for a given morph? >>> >>> Of course I don't want to override the given morph. Ideally I want to >>> pass a block of code to execute whenever the focus changes. >>> >>> Thanks >>> >>> Hilaire >>> >>> >> >> >> > > |
I plan to add slowly but steadily announcements to well known events in morphic for 2.0
- focused - lost focus - when selection changes focus seems to be a good next step :)
On Tue, May 22, 2012 at 6:53 PM, Stéphane Ducasse <[hidden email]> wrote:
|
In reply to this post by Igor Stasenko
On 22 May 2012 18:39, Hilaire Fernandes <[hidden email]> wrote:
> I found I have to override #keyboardFocusChange:, but it is far from a > good solutions. Basicly I want to show/hide a virtual keyboard only for > text edit morph, and when I want it. > yes, but i cannot see how you can do it without an evil overrides. I think best would be to discuss change/enhancement and integrate it into pharo. So you can legally use it in future without need to rely on overrides, which private to your project. > Thanks > > Hilaire > > Le 22/05/2012 18:15, Igor Stasenko a écrit : >> you will probably need to hook in at >> >> HandMorph>>newKeyboardFocus: >> >> On 22 May 2012 17:38, Hilaire Fernandes <[hidden email]> wrote: >>> Hello, >>> >>> I need to take an action when an arbitrary morph got the keyboard focus >>> (a text morph). >>> >>> How can I set up such an action for a given morph? >>> >>> Of course I don't want to override the given morph. Ideally I want to >>> pass a block of code to execute whenever the focus changes. >>> >>> Thanks >>> >>> Hilaire >>> >>> >> >> >> > > -- Best regards, Igor Stasenko. |
perhaps you could see whether the morphs get informed via #focusChanged?
werner |
In reply to this post by Igor Stasenko
On 22/05/2012 19:34, Igor Stasenko wrote:
>>>> I need to take an action when an arbitrary morph got the keyboard focus >>>> (a text morph). >>>> >>>> How can I set up such an action for a given morph? Indeed I have to. Morph is such a messy crap, it is a productivity killer. >>>> Of course I don't want to override the given morph. Ideally I want to >>>> pass a block of code to execute whenever the focus changes. It will be nice. I don't know how UI layer can be cleanly implemented from scratch, it is a huge task Hilaire |
In reply to this post by wernerk
On 22/05/2012 22:02, Werner Kassens wrote:
> perhaps you could see whether the morphs get informed via #focusChanged? > werner The problem is more to be capable to execute a given action when focusChanged. Hilaire -- Dr. Geo -- http://www.drgeo.eu |
I opened an issue and proposed a fix (http://code.google.com/p/pharo/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty&groupby=&sort=&id=5956) so we can do something like:
someMorph onAnnouncement: MorphGotFocus do: [ :ann | ... ]. someMorph onAnnouncement: MorphLostFocus do: [ :ann | ... ]. Can anybody review? Thanks, Guille On Wed, May 23, 2012 at 10:58 AM, Hilaire Fernandes <[hidden email]> wrote:
|
Great
Thanks Hilaire On 23/05/2012 12:28, Guillermo Polito wrote: > I opened an issue and proposed a fix ( > http://code.google.com/p/pharo/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty&groupby=&sort=&id=5956) > so we can do something like: > > someMorph onAnnouncement: MorphGotFocus do: [ :ann | ... ]. > someMorph onAnnouncement: MorphLostFocus do: [ :ann | ... ]. > > Can anybody review? > Thanks, > Guille > > On Wed, May 23, 2012 at 10:58 AM, Hilaire Fernandes < > [hidden email]> wrote: > >> On 22/05/2012 22:02, Werner Kassens wrote: >>> perhaps you could see whether the morphs get informed via #focusChanged? >>> werner >> >> The problem is more to be capable to execute a given action when >> focusChanged. >> >> Hilaire >> >> >> >> >> -- >> Dr. Geo -- http://www.drgeo.eu >> >> >> > -- Dr. Geo -- http://www.drgeo.eu |
Hilaire does it work for you?
Stef > Great > > Thanks > > Hilaire > > On 23/05/2012 12:28, Guillermo Polito wrote: >> I opened an issue and proposed a fix ( >> http://code.google.com/p/pharo/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty&groupby=&sort=&id=5956) >> so we can do something like: >> >> someMorph onAnnouncement: MorphGotFocus do: [ :ann | ... ]. >> someMorph onAnnouncement: MorphLostFocus do: [ :ann | ... ]. >> >> Can anybody review? >> Thanks, >> Guille >> >> On Wed, May 23, 2012 at 10:58 AM, Hilaire Fernandes < >> [hidden email]> wrote: >> >>> On 22/05/2012 22:02, Werner Kassens wrote: >>>> perhaps you could see whether the morphs get informed via #focusChanged? >>>> werner >>> >>> The problem is more to be capable to execute a given action when >>> focusChanged. >>> >>> Hilaire >>> >>> >>> >>> >>> -- >>> Dr. Geo -- http://www.drgeo.eu >>> >>> >>> >> > > > -- > Dr. Geo -- http://www.drgeo.eu > > |
I did not find the time to test it yet. I have to look at the house
building process. Do I need Pharo 2.0 to test it? Hilaire On 23/05/2012 17:21, Stéphane Ducasse wrote: > Hilaire does it work for you? > > Stef > >> Great >> >> Thanks >> >> Hilaire >> >> On 23/05/2012 12:28, Guillermo Polito wrote: >>> I opened an issue and proposed a fix ( >>> http://code.google.com/p/pharo/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty&groupby=&sort=&id=5956) >>> so we can do something like: >>> >>> someMorph onAnnouncement: MorphGotFocus do: [ :ann | ... ]. >>> someMorph onAnnouncement: MorphLostFocus do: [ :ann | ... ]. >>> >>> Can anybody review? >>> Thanks, >>> Guille >>> >>> On Wed, May 23, 2012 at 10:58 AM, Hilaire Fernandes < >>> [hidden email]> wrote: >>> >>>> On 22/05/2012 22:02, Werner Kassens wrote: >>>>> perhaps you could see whether the morphs get informed via #focusChanged? >>>>> werner >>>> >>>> The problem is more to be capable to execute a given action when >>>> focusChanged. >>>> >>>> Hilaire >>>> >>>> >>>> >>>> >>>> -- >>>> Dr. Geo -- http://www.drgeo.eu >>>> >>>> >>>> >>> >> >> >> -- >> Dr. Geo -- http://www.drgeo.eu >> >> > > > -- Dr. Geo -- http://www.drgeo.eu |
yep :/ The morph announcer is in pharo 2.0
On Wed, May 23, 2012 at 6:06 PM, Hilaire Fernandes <[hidden email]> wrote: I did not find the time to test it yet. I have to look at the house |
Ok, it will test soon.
Thanks Guille Hilaire On 23/05/2012 18:11, Guillermo Polito wrote: > yep :/ The morph announcer is in pharo 2.0 -- Dr. Geo -- http://www.drgeo.eu |
Free forum by Nabble | Edit this page |