This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Rick Mann
In my complex Core Data-based app, I get this behavior: 1. I launch the app with no prior state. It creates a .sqlite Core Data DB with some default data. 2. Quit and re-launch 3. App opens that default file. 4. I modify the file then save it. 5. I get the sheet that says, "This document’s file h

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Mike Abdullah
On 14 Oct 2013, at 10:37, Rick Mann wrote: > In my complex Core Data-based app, I get this behavior: > > 1. I launch the app with no prior state. It creates a .sqlite Core Data DB > with some default data. > 2. Quit and re-launch > 3. App opens that default file. > 4. I modify the file then sa

Re: collection of applications

2013-10-14 Thread Fritz Anderson
On 13 Oct 2013, at 11:29 PM, Maxthon Chan wrote: > method call -[UIApplication _terminate], it is private but since your apps > are in-house you are not bind to the rules Strictly speaking, this is not so. The Enterprise license (when I last looked at it about a year ago) requires that in-hous

Re: collection of applications

2013-10-14 Thread Fritz Anderson
On 13 Oct 2013, at 11:45 PM, Maxthon Chan wrote: > Maybe you have to tell your management that it is technically infeasible to > do so in iOS without jailbreaking. Either you bake them all in/use separate > SpringBoard icons or the dynamic libraries will not be loaded in vanilla iOS > device w

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Rick Mann
On Oct 14, 2013, at 02:46 , Mike Abdullah wrote: > So you're using the document architecture? Are you modifying the document > outside of the -writeToURL:… methods? If so, there's your problem. It's Core Data, so I only ever modify the file via -[NSManagedObjectContext save:]. I don't even im

Deferring creation of children when using bindings?

2013-10-14 Thread Rick Mann
I'm having trouble searching for a solution to this need: I have a tree controller bound to an array in my window controller. I populate it with top-level items, and they show up, but I'd like to defer populating the children of each item until the user actually clicks the disclosure triangle.

Re: Deferring creation of children when using bindings?

2013-10-14 Thread Jens Alfke
On Oct 14, 2013, at 1:33 PM, Rick Mann wrote: > I have a tree controller bound to an array in my window controller. I > populate it with top-level items, and they show up, but I'd like to defer > populating the children of each item until the user actually clicks the > disclosure triangle. Ge

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Mike Abdullah
On 14 Oct 2013, at 19:27, Rick Mann wrote: > > On Oct 14, 2013, at 02:46 , Mike Abdullah wrote: > >> So you're using the document architecture? Are you modifying the document >> outside of the -writeToURL:… methods? If so, there's your problem. > > It's Core Data, so I only ever modify the

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Rick Mann
On Oct 14, 2013, at 14:30 , Mike Abdullah wrote: > Therein lies your problem. You are modifying the document behind NSDocument's > back. Let the user/document system decide when to save, rather than saving > the context yourself. If you do desperately need to force a save, do so > through NSD

Re: Deferring creation of children when using bindings?

2013-10-14 Thread Rick Mann
On Oct 14, 2013, at 14:12 , Jens Alfke wrote: > > On Oct 14, 2013, at 1:33 PM, Rick Mann wrote: > >> I have a tree controller bound to an array in my window controller. I >> populate it with top-level items, and they show up, but I'd like to defer >> populating the children of each item unt

NSTreeController: how do I select a model object?

2013-10-14 Thread Jens Alfke
Hey, Rick’s tree controller question reminded me that I’ve got one I’ve been meaning to ask: With an NSOutlineView driven by an NSTreeController, I’m having trouble figuring out how to programmatically select an item: given one of my model objects, how do I tell the controller or view to select

Re: NSTreeController: how do I select a model object?

2013-10-14 Thread Shane Stanley
On 15 Oct 2013, at 8:18 AM, Jens Alfke wrote: > With an NSOutlineView driven by an NSTreeController, I’m having trouble > figuring out how to programmatically select an item: given one of my model > objects, how do I tell the controller or view to select it? I'm using datasources, but that sho

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Jerry Krinock
On 2013 Oct 14, at 14:46, Rick Mann wrote: > The document that was giving me the trouble is a "Library" document my app > implements. To edit an item in the library, I create a new document > "ItemEditorDoc", and give it an NSManagedObjectContext that is a child of the > LibraryDoc's MOC. (Wh

Re: NSTreeController: how do I select a model object?

2013-10-14 Thread Michael Babin
On Oct 14, 2013, at 4:18 PM, Jens Alfke wrote: > With an NSOutlineView driven by an NSTreeController, I’m having trouble > figuring out how to programmatically select an item: given one of my model > objects, how do I tell the controller or view to select it? > > NSTreeController has a .select

Re: NSTreeController: how do I select a model object?

2013-10-14 Thread Shane Stanley
On 15 Oct 2013, at 9:30 AM, Shane Stanley wrote: > I'm using datasources, but that shouldn't matter: But first coffee of the day tells me that's precisely the point. Sorry for the noise. -- Shane Stanley 'AppleScriptObjC Explored' ___ Cocoa-dev

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Rick Mann
On Oct 14, 2013, at 15:37 , Jerry Krinock wrote: > Creating a document to edit an item seems pretty weird. "Give it a child > MOC" (setting its managed object context, I presume) from some other document > seems even more weird. I would recommend a more conventional design. That's how I fel

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Kyle Sluder
On Mon, Oct 14, 2013, at 04:46 PM, Rick Mann wrote: > > On Oct 14, 2013, at 15:37 , Jerry Krinock wrote: > > > Creating a document to edit an item seems pretty weird. "Give it a child > > MOC" (setting its managed object context, I presume) from some other > > document seems even more weird.

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Kyle Sluder
On Mon, Oct 14, 2013, at 05:27 PM, Kyle Sluder wrote: > The new concurrency types are explicitly designed around _not_ accessing > a persistent store via two different Core Data stacks. And rereading your first post, I see "I modify the file and then save it" does not imply the behind-the-scenes t

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Rick Mann
On Oct 14, 2013, at 17:27 , Kyle Sluder wrote: > a persistent store via two different Core Data stacks. > > Your intended UI sounds fine, but you should create a child MOC and > attach it to your document's main MOC. You should not be writing to the > on-disk store behind the document's PSC's b

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Rick Mann
On Oct 14, 2013, at 17:28 , Kyle Sluder wrote: > And rereading your first post, I see "I modify the file and then save > it" does not imply the behind-the-scenes trickery I thought it did. > Never mind! No worries ;-) It's sometimes hard to be both precise, and brief. -- Rick signature.

Re: NSTreeController: how do I select a model object?

2013-10-14 Thread Jens Alfke
On Oct 14, 2013, at 3:49 PM, Michael Babin wrote: > I used the method described here on a project using NSTreeController and > bindings to populate an outline view: > http://blog.wilshipley.com/2006/04/pimp-my-code-part-10-whining-about.html > I'm not aware of any changes to NSTreeController/bi

Re: collection of applications

2013-10-14 Thread Maxthon Chan
I am saying in-house apps deployed in an ad-hoc fashion. (also, you can use exit(3) which is a public POSIX API but it is less elegant) If the apps have the same developer ID, you can also use a shared keychain. I did that for a few App Store apps that shares a login. On Oct 14, 2013, at 22:49,

Re: collection of applications

2013-10-14 Thread Maxthon Chan
You can use a repo and package limiting tool on jailbroken devices, and make sure that only whitelisted packages/repos are accessible. Also, for those sensitive data, something like TLS/IPSec will help a lot. On Oct 14, 2013, at 22:59, Fritz Anderson wrote: > On 13 Oct 2013, at 11:45 PM, Maxth