logo       

Returning focus to caller: msg#00223

lang.smalltalk.squeak.beginners

Subject: Returning focus to caller

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.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise