discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with currentDocument and mainWIndow


From: Riccardo Mottola
Subject: problem with currentDocument and mainWIndow
Date: Wed, 06 May 2009 00:28:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090504 SeaMonkey/1.1.16

Hello,

my goal is to get the current document for a running application. This application is, however, not currently order front, but it is running and has a single, new, open document (just the default when you start it up).

The specific case is the Vespucci browser. The goal is to respond to a call that happens when another application invokes Vespucci to open an URL, to respond I want to check the current document.

What happens is that the NSDocumentController currentDocument (line 1005) checks for the main window and asks that one for the document. What happens though that the main window is null:



(gdb) s
-[NSApplication mainWindow] (self=0x8186b88, _cmd=0xb7f3af18)
   at NSApplication.m:2440
2440      return _main_window;
(gdb) p _main_window
$4 = (class NSWindow *) 0x0

I guess because it is not key-order-front. I think this is wrong, but I am not sure. Yet even if there is no wain window, it has sense to have a current document, doesn't it?

It seems to me however, but I have other problems there thus my debugging went poorly, that Mac is consistent as far as nor providing a current document, I wonder how I can solve my need though.

Riccardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]