In the past QLThumbnailImageCreate would return an NSImage from a url pointing to a webarchive. It's not doing so now. Is this a bug, or do I not understand something?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
There are a number of answers to this question on the web. The latest that I have found is for early 2020, and it no longer seems appropriate. What is the current method?
If I set a breakpoint in drag and drop within ...AcceptDrop... [in a NSOutlineView], both the app and Xcode hang. The only way I know to handle this is to force the app to quit then open Xcode. This shows the breakpoint, but the app can not continue.
Is there a better way to handle this?
On launching my app from Xcode, my document-based app automatically apparently tries to load a cached document from a previous launch. That document appears to be corrupted as the app crashes in initWithCoder [which was called from readFromData:].
The solution appears to be to delete the cached documents. Where are they located and is there anything special about deleting them?
When a user is editing a NSTextView and commits some kinds of operations (e.g. Quiting an app), the NSTextView's textStorage does not contain the current contents of the NSTextView. How do I get the current contents?
I suspect that my mac app's savedstate data is over full. I've been doing a great many launches of my mac application which involves creating new files, then breaking back to Xcode. Now a stable compiled version and a later version launched from inside Xcode both crash. The Xcode crashes are preceded by NSDocumentController calls that include the suggestive phrase: "... makeDocumentForURL:withContentsOfURL:alternateContent...". As this occurs before control is given to my code, it must be part of document-based app's launch activity. The only thing I can see to do is to delete the app's savedstate data.
How do I delete this savedstate data? The instructions on the web are out-of-date.
When calling:NSURL* aURL = [NSURL URLByResolvingBookmarkData:secBookmark options:options relativeToURL:nil bookmarkDataIsStale:&isStale error:&err];isStale is YES.When attempting to get a fresh bookmark, calling:NSData* secureBookmark = [aURL bookmarkDataWithOptions:options includingResourceValuesForKeys:nil relativeToURL:nil error:&err];produces:2019-03-11 15:53:51.603133-0700 XXX[534:8439] Error: Error Domain=NSCocoaErrorDomain Code=256 "Could not open() the item" UserInfo={NSURL=file:///Users/oldmancoyote1/Desktop/E%20Projects%20folder/Drawing/Drawing%201%20.pdf, NSDebugDescription=Could not open() the item}If I ignore isStale, there appears to be no problem. Can I safely ignore isStale?