Returning focus to caller

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Returning focus to caller

Jesus Alvarez-2
I have a Squeak application that has a main window (SystemWindow) and
sometimes opens dialog windows to request user input (also SystemWindows).
When a dialog is closed, I would like to return keyboard and mouse focus to
the caller. I tried

returnFocus
        (model isMorph) ifTrue: [
                self currentHand newKeyboardFocus: model.
                self currentHand newMouseFocus: model.].

but that doesn't work. If several windows are open, it can return to a
window other than the caller. BTW - The model is the caller window.

What is the recommended way to return focus to a previous window?

Thanks.
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners