Beginners Unanswered Questions
Ron Teitelbaum
Ron at USMedRec.com
Tue May 9 20:46:52 UTC 2006
Hi Hernán,
I tried this already and was really confused by it. I used a paste up and
two text fields. I found the method valueAtCursor which returned the active
text field, and by following what the code was doing with tab I found this
method. I expected that setting the keyboard focus through an inspector
that something would happen. Nothing did, even valueAtCursor didnt change.
I noticed that moving my mouse stole the cursor but I figured that since
valueAtCursor didnt change that it didnt work the way I expected it too
and there was more to the story then I understood. There was a bunch of
other code besides this method, so I figured there had to be an easier way!
I would seem to me that having the mouse steal focus would be a disaster for
forms and business UIs where using a mouse in most cases is not recommended
is there a way to turn that off or disable it while in a Morphic? (Until
another Morphic is selected)
Is the answer for Marcus use MVC or wxSqueak?
Thanks,
Ron Teitelbaum
_____
From: Hernan Tylim [mailto:htylim at gmail.com]
Sent: Tuesday, May 09, 2006 4:21 PM
To: Ron at usmedrec.com; The general-purpose Squeak developers list
Subject: Re: Beginners Unanswered Questions
Hi, about this one:
On 5/9/06, Ron Teitelbaum <Ron at usmedrec.com> wrote:
http://lists.squeakfoundation.org/pipermail/beginners/2006-May/000052.html
how to set the focus on to a textMorph
ActiveHand newKeyboardFocus: aTextMorph.
ActiveHand is a global which points to the HandMorph instance of the active
world (you can also access this instance from inside any Morph with
Morph>>activeHand)
BTW, when dealing with keyboard focus remember that Squeak has a "keyboard
focus follows mouse" policy. So even if you are setting it up
programatically any other morph might steal your keyboard focus. (try it
with a browser, start typing inside the text pane and move your mouse to any
of the upper lists).
Regards,
Hernán
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060509/9909252a/attachment.htm
More information about the Squeak-dev
mailing list
|