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@lists.squeakfoundation.org