Re: Need replacement of Component Manager::OpenDefaultComponent

2017-02-25 Thread dangerwillrobinsondanger
Yeah but even with OSAKit, to implement a language you need to link to Carbon and use deprecated Carbon calls. Sent from my iPhone > On Feb 26, 2017, at 7:18, じょいすじょん wrote: > > Are you implementing scriptability for a Cocoa application? If so, you >

Re: I think I screwed up Core Data multi-threading rules.

2017-02-25 Thread Quincey Morris
On Feb 25, 2017, at 14:58 , Daryle Walker wrote: > > I thought the entire AppKit, which includes NSDocument, runs only on the main > thread. The exceptions are methods that specially state that they have a > multi-threaded mode. Much stuff in AppKit must be called on the main

Re: Need replacement of Component Manager::OpenDefaultComponent

2017-02-25 Thread Ken Heglund
If you are linking against OSAKit, then something like the following (from ) may be a starting point: ComponentInstance compInstance = [[OSALanguage defaultLanguage] componentInstance]; -Ken > On Feb 25, 2017, at 1:02 PM, sumit bansal > wrote: > > I am using

Re: I think I screwed up Core Data multi-threading rules.

2017-02-25 Thread Daryle Walker
> On Feb 23, 2017, at 10:43 PM, Quincey Morris > wrote: > > On Feb 23, 2017, at 18:25 , Daryle Walker > wrote: >> >>>override func save(to url: URL, ofType typeName: String, for >>> saveOperation:

Re: NSDocument autosavesInPlace + package file = no revert?

2017-02-25 Thread Markus Spoettl
On 25/02/17 21:01, Quincey Morris wrote: On Feb 25, 2017, at 11:16 , Markus Spoettl > wrote: My concern is that my packages can get huge in the 100MB to multiple GB range with hundreds of folders and thousands of individual files

Re: Need replacement of Component Manager::OpenDefaultComponent

2017-02-25 Thread sumit bansal
I am using it to implement scripting in my project. I have used the API in following way: *ComponentInstance & compInstance = OpenDefalutConmponent(kOSAComponentType, kOSAGenericScriptingComponentSubtype);* *OSASetSendProc( compInstance, someParam1, someParam2); //function in

Re: NSDocument autosavesInPlace + package file = no revert?

2017-02-25 Thread Quincey Morris
On Feb 25, 2017, at 11:16 , Markus Spoettl wrote: > > My concern is that my packages can get huge in the 100MB to multiple GB range > with hundreds of folders and thousands of individual files inside. Will the > NSDocument storing system/AppKit cope with that? My

Re: NSDocument autosavesInPlace + package file = no revert?

2017-02-25 Thread Markus Spoettl
On 25/02/17 19:57, Quincey Morris wrote: Returning false from this method disables version browsing and revertToSaved(_:), which rely on version preservation when autosaving in place. IOW, you can’t expect reverting to revert in your situation. Thanks Quincey for the - as usual - super fast

Re: NSDocument autosavesInPlace + package file = no revert?

2017-02-25 Thread Quincey Morris
On Feb 25, 2017, at 10:41 , Markus Spoettl wrote: > > I looked at what happens when the application quits and > > - (BOOL)revertToContentsOfURL:ofType:error: > > is called. The absoluteURL passed in is the original file URL. So it's not > surprising that this call

NSDocument autosavesInPlace + package file = no revert?

2017-02-25 Thread Markus Spoettl
Hi, I have a problem with autosavesInPlaces and my package document and reverting changes. The setup first: All of the following methods in my NSDocument subclass return YES + (BOOL)autosavesInPlace + (BOOL)autosavesDrafts - (BOOL)canAsynchronouslyWriteToURL::: -