nsdocument Questions

4

Solved

I am trying to write an application that can open any folder in the NSDocument subclass but can't figure out the right Info.plist settings. It is important that my app should not use bundles, neith...
Sharpwitted asked 20/12, 2012 at 10:15

4

I'm working on my first Mac document-based application. I have subclassed NSDocument, reimplementing methods such as - (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NS...
Theology asked 18/1, 2012 at 15:2

2

Solved

Currently there is a button on my app inteface which allow to open a file, here is my open code: In my app.h: - (IBAction)selectFile:(id)sender; In my app.m: @synthesize window; - (void)appli...
Waxwork asked 16/3, 2011 at 21:8

6

Solved

I'm doing some crazy multiple documents inside a single window stuff with the document-based architecture and I'm 95% done. I have this two-tier document architecture, where a parent document open...
Bosworth asked 22/11, 2010 at 1:0

0

Some of the time when using my Document-based mac app (Xcode 10, Swift 4.2, macOS 10.13.5), I get the following error in the console: _NSDocumentBasicAsyncOperation 0x60c000233c40 went isFinishe...
Lowbred asked 3/2, 2019 at 18:30

6

Solved

I've just added iCloud support to an app that I am working on. Its working great, except that when I open the application without a document in focus the iCloud open file dialog appears and I don't...
Woof asked 11/12, 2012 at 17:19

4

Solved

In my application, a NSDocument subclass mission-critical hardware – users really don’t want to close a document by accident! So, I’ve implemented canCloseDocumentWithDelegate… to show an NSAlert a...
Kreutzer asked 1/12, 2015 at 23:15

3

Solved

I've got plenty of experience with iOS, but Cocoa has me a bit confused. I read through several Apple docs on Cocoa but there are still details that I could not find anywhere. It seems the document...

3

A search on the title of this post reveals that it's pretty common; indeed, I've gotten this error from Xcode. But I can't seem to find any fixes. I'm seeing it now when I run my program, and it ap...
Xenogamy asked 9/6, 2012 at 2:37

4

Solved

I have an NSDocument with some simple code: - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError { self.string = [[NSString alloc] initWithData:data encoding...
Bise asked 10/2, 2014 at 22:11

3

Solved

I have an NSDocument based app with autosave enabled. I'd like to prevent this popup from showing: I have tried returning nil from NSWindow's –title, –representedFilename and –representedURL whi...
Dermatogen asked 6/5, 2014 at 12:14

2

I'm designing a custom application and I've set a custom icon for my file type. I've put the icon on both Document Types and Exported UTIs section (filling in other values too, obviously). Here i...
Ramage asked 4/7, 2015 at 13:18

1

Solved

The latest version of macOS Sierra adds a 'Show/Hide tab bar' menu item to the 'View' menu. It does this dynamically. My application already includes its own tab bar using the MMTabBarView libr...
Sankey asked 9/11, 2016 at 14:0

3

Solved

How do I prevent a window title from displaying "Edited" for an NSDocument which is dirty? I'm managing saving and autosaving myself, using a web service, and just don't want the distraction in th...
Enalda asked 27/4, 2012 at 2:36

1

I started a little document based application with a NSOutlineView on the main window. I saved my model in files using NSCoding protocol in the model classes and everything is fine. Next I wanted ...
Wellesley asked 19/11, 2012 at 16:28

1

Solved

I'm building an OS X app that uses core data, NSDocument, storyboards, and Cocoa bindings. My expectation is that the following occurs: An instance of MyDocument (NSDocument subclass) is created...

4

Solved

I having trouble figuring out NSBundle & DocumentDirectory data, I have a Camera Picture "imageView" that I'm saving to the NSDocumentDirectoy and then want to retrieve it for attaching to an e...
Pixie asked 10/1, 2010 at 15:24

3

Solved

My application allows the user to rename documents that are currently open. This is trivial, and works fine, with one really annoying bug I can't figure out. When a file is renamed, AppKit (kindly)...
Wallop asked 3/12, 2010 at 9:17

2

Solved

Apple documentation suggests to override an NSDocument convenience init (initWithType:error:) as described here. However, as this is a convenience init, I cannot override it. But I still need to e...
Cleaver asked 29/12, 2014 at 19:34

3

I have an NSDocument based application that uses filewrappers to save and load its data. The document can have all kinds of resources, so I don't want to load everything into memory. I might be doi...
Afterworld asked 7/10, 2013 at 15:36

1

Solved

I know how to tell NSDocument that there are new changes, with -(void)updateChangeCount:. But, I can't find a method changeCount or something like this to check if an NSDocument has unsaved changes...
Rue asked 23/1, 2014 at 12:43

2

Solved

So after googling a bit it's my understanding that when I use a bundle for my document in a NSDocument-based app I have to write the entire bundle each time I want to save? This is starting to get ...
Ecclesiasticism asked 27/5, 2013 at 12:34

3

Solved

I use a UIWebView to load a local html, and there is a PNG file inside the html created by Objc. After the PNG file has been modified, I reload the html in UIWebView, but the image doesn't change....
Brigantine asked 5/2, 2013 at 17:56

1

Solved

Updated I am able to create single PDF page of photo captured with comment in iPHone. On button click I am generating one single PDF page every time and I want those PDF page in single PDF bunch. I...
Shod asked 20/5, 2013 at 9:6

1

Consider a Cocoa NSDocument that supports two document types (e.g. BMP and JPEG). While one type has no save options (e.g. BMP), the other does (e.g. compression level for JPEG). How do you implem...
Fuss asked 12/3, 2013 at 9:35

© 2022 - 2024 — McMap. All rights reserved.