[Pharo-project] Morph on focus lost
Hi guys, quick question, what's the equivalent event of blur on morphs? What event you need to observe in a morph if you need to react to the focus lost in that morph? sebastian o/
morphToSpy announcer weak on: MorphLostFocus send: #spyingMethod to: #spyingReceiver :) Ben On Nov 25, 2012, at 8:35 PM, Sebastian Sastre wrote:
Hi guys,
quick question,
what's the equivalent event of blur on morphs?
What event you need to observe in a morph if you need to react to the focus lost in that morph?
sebastian
o/
okay, for the record: 1. announcements are exclusive to instances and don't bubble through morph parents/owners* and 2. it works Pharo 2.0 only but I'm okay with that (I've ported the app from 1.4 in ~20min) thanks! sebastian o/ PD: BTW, that thing about making all morphs having its own announcer in the extension, great move! * sounds like it works like that as a feature, I just say it because I found most of the times is convenient that events "bubble" in any case adding bubble to morphs is as simple as: announce: anAnnouncement "Announces anAnnouncement from this morph and, if anAnnouncement is still bubbling, tell its parent to do the same" | aParent | self announcer announce: anAnnouncement. anAnnouncement isBubbling ifTrue:[ aParent := self getBubblingParent. aParent ifNotNil:[ aParent announce: anAnnouncement ]] On Nov 25, 2012, at 5:43 PM, Benjamin wrote:
morphToSpy announcer weak on: MorphLostFocus send: #spyingMethod to: #spyingReceiver
:)
Ben On Nov 25, 2012, at 8:35 PM, Sebastian Sastre wrote:
Hi guys,
quick question,
what's the equivalent event of blur on morphs?
What event you need to observe in a morph if you need to react to the focus lost in that morph?
sebastian
o/
may be mouseLeave: evt "Handle a mouseLeave event, meaning the mouse just left my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." Stef On Nov 25, 2012, at 8:35 PM, Sebastian Sastre wrote:
Hi guys,
quick question,
what's the equivalent event of blur on morphs?
What event you need to observe in a morph if you need to react to the focus lost in that morph?
sebastian
o/
Nop, because the focus stay even when the mouse leave the bounds of the morph :) Ben On Nov 25, 2012, at 8:46 PM, Stéphane Ducasse wrote:
may be
mouseLeave: evt "Handle a mouseLeave event, meaning the mouse just left my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it."
Stef
On Nov 25, 2012, at 8:35 PM, Sebastian Sastre wrote:
Hi guys,
quick question,
what's the equivalent event of blur on morphs?
What event you need to observe in a morph if you need to react to the focus lost in that morph?
sebastian
o/
thanks Master :) On Nov 25, 2012, at 8:49 PM, Benjamin wrote:
Nop,
because the focus stay even when the mouse leave the bounds of the morph :)
Ben
On Nov 25, 2012, at 8:46 PM, Stéphane Ducasse wrote:
may be
mouseLeave: evt "Handle a mouseLeave event, meaning the mouse just left my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it."
Stef
On Nov 25, 2012, at 8:35 PM, Sebastian Sastre wrote:
Hi guys,
quick question,
what's the equivalent event of blur on morphs?
What event you need to observe in a morph if you need to react to the focus lost in that morph?
sebastian
o/
participants (3)
-
Benjamin -
Sebastian Sastre -
Stéphane Ducasse