.
I thought that having some InfoPanel which shows data of the current NSDocument
would be a fairly common scenario.
But anyway.
I decided to follow your suggestions.
My app delegate now has:
@property (strong) GmdDocument *currentDocument;
In applicationDidFinishLaunching: it registers
(strong) GmdDocument *currentDocument;
In applicationDidFinishLaunching: it registers for
NSWindowDidBecomeMainNotification and NSWindowWillCloseNotification (not for
NSWindowDidResignMainNotification because I want my InfoPanel to keep it's
data when some other app becomes active
to follow your suggestions.
My app delegate now has:
@property (strong) GmdDocument *currentDocument;
In applicationDidFinishLaunching: it registers for
NSWindowDidBecomeMainNotification and NSWindowWillCloseNotification (not for
NSWindowDidResignMainNotification because I want my
of the current
NSDocument would be a fairly common scenario.
But anyway.
I decided to follow your suggestions.
My app delegate now has:
@property (strong) GmdDocument *currentDocument;
In applicationDidFinishLaunching: it registers for
NSWindowDidBecomeMainNotification
On Oct 26, 2012, at 6:52 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote:
Yes. I saw that in your previous post. But I asked both AppKiDo and Xcode
and nobody showed me any documentation about this accessor.
So I am wary of using undocumented stuff.
It's actually a method on
I have a Panel which has a PopUpButton which has it's Content Values bound to
an ArrayController.
The ArrayController has it's Content Array bound to File's Owner:
currentDocument.listOfThings.
The File's Owner (aka) Application Delegate:
@property (readonly) DocumentSubclass *currentDocument
On Oct 25, 2012, at 4:36 AM, Gerriet M. Denkmann wrote:
This works, but I have a strong feeling that there is a very obvious better
solution which I somehow cannot see.
There actually isn't an obvious solution.
-[NSDocumentController currentDocument] isn't KVOable (which is a bummer
On Thu, Oct 25, 2012, at 09:42 AM, Seth Willits wrote:
But, if you just use the -object in the notification to
windowDidBecomeMain: you're fine. So if you keep a reference to that
window/document yourself and return it from your own currentDocument
that'd work. You also need to watch
currentDocument
that'd work. You also need to watch windowWillResignMain:
windowWillClose: and optionally(?) applicationDidBecomeActive: (And
actually, this is how Omni has been doing it for yars.)
NSWindow has a -document accessor, so you don't need to override
-currentDocument.
But yes
Hi,
I use to get the currentDocument this way
[[NSDocumentController sharedDocumentController] currentDocument]
It works well but not in the following case
My apps opens automatically a document with
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName
error:(NSError
On 2008 Dec, 02, at 8:06, gMail.com wrote:
I really build my objects using the dictionary mDocDict. But at this
point
[[NSDocumentController sharedDocumentController] currentDocument]
returns nil..
How to fix this?
Looks like your document is not registered
On Tue, Dec 2, 2008 at 11:06 AM, gMail.com [EMAIL PROTECTED] wrote:
Hi,
I use to get the currentDocument this way
[[NSDocumentController sharedDocumentController] currentDocument]
It works well but not in the following case
My apps opens automatically a document with
- (BOOL
12 matches
Mail list logo