Re: Opening a file but not associating with NSDocument

2016-05-20 Thread Jerry Krinock
> On 2016 May 19, at 23:40, Rick Mann wrote: > > By "Reader," do you mean "Viewer?" I see no "Reader" option. Yes, I remembered the wrong word. English is so redundant. :) > Also, what do you mean "have no windows?" I just don't create anything in > -makeWindowControllers? Correct. > I'm c

Re: Opening a file but not associating with NSDocument

2016-05-19 Thread Rick Mann
> On May 19, 2016, at 22:16 , Jerry Krinock wrote: > > >> On 2016 May 19, at 16:13, Rick Mann wrote: >> >> I have a complex NSDocument with lots of files. One of those files is has a >> .mfst extension. If the user double-clicks one of those files, I want my app >> to create my NSDocument s

Re: Opening a file but not associating with NSDocument

2016-05-19 Thread Jerry Krinock
> On 2016 May 19, at 16:13, Rick Mann wrote: > > I have a complex NSDocument with lots of files. One of those files is has a > .mfst extension. If the user double-clicks one of those files, I want my app > to create my NSDocument subclass, and then call a method on it to read the > contents o

Opening a file but not associating with NSDocument

2016-05-19 Thread Rick Mann
I have a complex NSDocument with lots of files. One of those files is has a .mfst extension. If the user double-clicks one of those files, I want my app to create my NSDocument subclass, and then call a method on it to read the contents of that file, but I don't want that to be the file it then

Re: Opening a file read-only?

2011-08-10 Thread Douglas Davidson
On Aug 10, 2011, at 8:10 AM, Wade Tregaskis wrote: > Note also that initWithContentsOfMappedFile: is deprecated in 10.7. There > doesn't appear to be a replacement; I presume you're supposed to use > initWithContentsOfFile:, but that really does read the entire file in at init > time (into a

Re: Opening a file read-only?

2011-08-10 Thread Wade Tregaskis
> Try running fs_usage while your app is running, and you’ll be able to see > what files it opens and in which modes. > (Or there’s probably an Instrument for that now?) There's half a dozen related to file I/O, which unfortunately makes it very awkward to use for even simple tasks like this. Y

Re: Opening a file read-only?

2011-07-20 Thread Jens Alfke
On Jul 19, 2011, at 6:55 PM, Graham Cox wrote: > Because we just got rejected on the App Store for opening a file with > read/write access in a place that's not allowed. I've checked the code that > we're not writing or creating files to these locations - we'

Re: Opening a file read-only?

2011-07-19 Thread Graham Cox
but none of these options seem to open it read-only. > > I believe it already opens the file read-only. What makes you suspect that it > does not? Because we just got rejected on the App Store for opening a file with read/write access in a place that's not allowed. I've ch

Re: Opening a file read-only?

2011-07-19 Thread Greg Parker
On Jul 19, 2011, at 6:29 PM, Graham Cox wrote: > I'm using +[NSData dataWithContentsOfMappedFile:] to access a file. Is it > possible to ensure this opens read-only? I see there's a version that takes > options, but none of these options seem to open it read-only. I believe it already opens the

Opening a file read-only?

2011-07-19 Thread Graham Cox
I'm using +[NSData dataWithContentsOfMappedFile:] to access a file. Is it possible to ensure this opens read-only? I see there's a version that takes options, but none of these options seem to open it read-only. --Graham ___ Cocoa-dev mailing list (

Re: Opening a file for writing text in /private/var/log

2010-06-14 Thread Ken Thomases
On Jun 13, 2010, at 10:24 AM, Pierre Fournier wrote: > Hi,I want to log something in a file at /private/var/log, using NSFileHandle. Do you really want to do that? Have you considered ~/Library/Logs? Or using the Apple System Log facility

Re: Opening a file for writing text in /private/var/log

2010-06-14 Thread Nick Zitzmann
On Jun 13, 2010, at 9:24 AM, Pierre Fournier wrote: > Hi,I want to log something in a file at /private/var/log, using > NSFileHandle.With the app launched as root, everything runs ok using > [NSFileHandle fileHandleForWritingToURL:url error:&err]. I get a valid handle > and can write what I wa

Opening a file for writing text in /private/var/log

2010-06-14 Thread Pierre Fournier
Hi,I want to log something in a file at /private/var/log, using NSFileHandle.With the app launched as root, everything runs ok using [NSFileHandle fileHandleForWritingToURL:url error:&err]. I get a valid handle and can write what I want to. With the app launched as non-root user, I create an Au

opening a file

2009-03-30 Thread James Gifford
Hello! I am trying to open i file (the license for my app) when the user clicks on a menu item. i gave applescript a try but it did not work. any ideas? the website for the application is below. -James Gifford The Downloadermac Project: http://code.google.com/p/downloadermac Google Group: http:/