Skip navigation.
 
mlRe: newbie:how to get the frontmost window but a key window
FROM : norio
DATE : Fri Jan 11 11:58:46 2008

Joar, thanks for your quick response.

What I want to do is to search text from the window just below 
"Find..." dialog, like almost every text editor do.

My app opens a window which doesn't have text input field at launch 
time. The window just displays something.

Then open a document by selecting Open... from File menu. So you can 
open several windows. I thought they were main windows.

And open Find.. window and when you press Find button on the window, 
text is being searched from the document of the window just below the 
Find window.

With these steps, currentDocument and mainWindow return nil as I told 
in the previous mail.
Who sets a window to main window? I went to see the inspector window 
of the window in IB but I couldn't get.

I wish I could explain more clearly.

Norio Ota

On 2008/01/11, at 14:53, j o a r wrote:

> Hi,
>
> What is the problem that you're really trying to solve here? Why do 
> you need to find a window behind the key window that's not the main 
> window? I suspect that we will be able to give you a better answer 
> if we can understand what you're really trying to do.
>
> As an example, your real problem might not be that you need the 
> ability to find a non-main window, but rather that the window you're 
> trying to find *should* be main, but isn't. It's important to 
> identify the correct problem to solve before attempting to find a 
> solution.
>
> j o a r
>
>
> On Jan 10, 2008, at 8:15 PM, norio wrote:
>

>> Hi,
>>
>> I'd like to know how to get the most front window below a key 
>> window (e.g.Find dialog).
>>
>>
>> I've tried the following things but failed.
>>
>> 1. call currentDocument of the sharedDocumentController and tried 
>> to get the window from the document.
>>  But the document returned by currentDocument was nil.
>>
>> 2. call mainWindow of the sharedApplication. But the return object 
>> was nil.
>>
>>
>> Thanks in advance.
>> Norio Ota

>

Related mailsAuthorDate
mlnewbie:how to get the frontmost window but a key window norio Jan 11, 05:15
mlRe: newbie:how to get the frontmost window but a key window j o a r Jan 11, 06:53
mlRe: newbie:how to get the frontmost window but a key window norio Jan 11, 11:58
mlRe: newbie:how to get the frontmost window but a key window j o a r Jan 11, 17:41