[Etoys] Focus on a stringMorph embedded in a PastupMorph

Hilaire Fernandes hilaire at ofset.org
Sat Jan 26 09:25:13 EST 2008


Thanks for the tip, but it does not work. I use it that way:
It really looks like the area is missing the focus. I will ask later
on squeak-dev.

rename
	| anEvent |
	costume textMorph
		ifNil: [costume textMorph: 'éditez-moi'].
	anEvent := MouseButtonEvent new
				setType: #mouseDown
				position: costume textMorph bounds center
				which: 4
				buttons: 12
				hand: costume textMorph currentHand
				stamp: nil.
	anEvent handler: costume textMorph owner.
	costume textMorph launchMiniEditor: anEvent


2008/1/16, Kazuhiro ABE <abee at squeakland.jp>:
> Hello, Hilaire.
>
> I think you need to set a handler variable of an MouseButtonEvent like
> following:
>
> anEvent := MouseButtonEvent new
>         setType: #mouseDown
>         position: aStringMorph bounds center
>         which: 4
>         buttons: 12
>         hand: aStringMorph currentHand
>         stamp: nil.
> anEvent handler: aStringMorph owner.
> aStringMorph launchMiniEditor: anEvent.
>
> Regards,
> Kazuhiro Abe
>
> 2008/1/17, Hilaire Fernandes <hilaire at ofset.org>:
> > I have a pasteupmorph wtih a StringMorph into it.
> > When I request (through an external command) edit with the
> > launchMiniEditor, I immediately lose the the focus of the string
> > morph. To get it working I first need to click in the background of
> > the PasteUpMorph.
> > I have tried various message for keyboard/mouse focus without success.
> >
> > Hilaire
> _______________________________________________
> Etoys mailing list
> Etoys at lists.laptop.org
> http://lists.laptop.org/listinfo/etoys
>


-- 
http://blog.ofset.org/hilaire
Smalltalkers do: [:it | All with: Class, (And love: it)]


More information about the Etoys mailing list