• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows


  • Subject: Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 06 Apr 2012 09:13:27 -0700

On Apr 6, 2012, at 8:29 AM, Gilles Celli <email@hidden> wrote:

> Versions ? Well here in my case for now I don't need it for my application since it's kind a viewer / visualizer of the data, I'm not editing or changing anything
> to the file…it's a like a PDF viewer but here for data / graphs.

Fair enough. But you do need to deal with other apps using Versions and file coordination against the files you have open. If you don't follow NSDocument's standard windowing paradigm, it can't perform its normal behavior (like throwing up a sheet alerting to the user that a file has changed).

Or hell, maybe it can. You might be able to use -windowForSheet to point NSDocument at the shared window.


>
> Maybe you got me wrong but it's simply to append the file's contents that the user selected in the "Open Panel" and put these selected file contents
> (=NSString *fileContent1 + *fileContent 2 etc.) to one big appended NSString *multiContent, then of course call makeWindowControllers
> to open the NSDocument Window.

I think you will not want any of your documents to own your window; the window should be owned by the app and -makeWindowControllers would do nothing. You can monitor your NSDocumentController to determine whether to open or close your shared window.

>
> The advantage of using NSDocument are multiple, and mainly printing to PDF works great etc. so it should be possible (since it's possible on Windows XP ;-)

Of course you can do pretty much anything on OS X that you can do on Windows. But OS X's frameworks are designed to discourage bad decisions. The bias inherent in the frameworks produces a consistency across apps that users appreciate.

Just because something is easy on some other platform does not mean it should be easy on OS X.

That said, it sounds like you have a decent use case that won't fight the framework too badly.

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows
      • From: Kevin Perry <email@hidden>
References: 
 >NSDocument app: combine multiple file contents to open one window instead of multiple windows (From: Gilles Celli <email@hidden>)
 >Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows (From: Kyle Sluder <email@hidden>)
 >Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows (From: Gilles Celli <email@hidden>)

  • Prev by Date: Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows
  • Next by Date: Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows
  • Previous by thread: Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows
  • Next by thread: Re: NSDocument app: combine multiple file contents to open one window instead of multiple windows
  • Index(es):
    • Date
    • Thread