gnustep-dev
[Top][All Lists]
Advanced

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

Re: open recent in renaissance?


From: Wolfgang Lux
Subject: Re: open recent in renaissance?
Date: Fri, 14 May 2010 09:48:52 +0200

Tim Schmielau wrote:

My app is not document based. But that's just what Apple's documentation
says for [NSDocumentController noteNewRecentDocumentURL:]

  "NSDocument automatically calls this method when appropriate for
NSDocument-based applications. Applications not based onNSDocument
must also implement the application:openFile: method in the application
delegate to handle requests from the Open Recent menu command."

Thank you for making me aware of that piece of documentation. I have changed NSDocumentController in svn to give the application delegate a chance to open files from the recent documents menu.

I can't at the moment find the Apple sample code where I derived this
from. But my app does just these two things:

  [[NSDocumentController sharedDocumentController]
noteNewRecentDocumentURL:[NSURL fileURLWithPath: filename]]; to add
entries to the recent documents menu,
  and implement - (BOOL)application:(NSApplication *)theApplication
openFile:(NSString *)filename to open files.

I guess it comes from the TextEdit sample code on 10.4 or earlier, which was not document based at that time.

It works flawlessly on OS X.

And hopefully now does so on GNUstep as well.

Wolfgang




reply via email to

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