Re: Data not retained in document based core data app with cocoa bindings

2015-10-12 Thread Jerry Krinock
> On 2015 Oct 11, at 09:30, Richard Charles wrote: > >> On Oct 11, 2015, at 2:41 AM, Devarshi Kulshreshtha >> wrote: >> >> Looking for more clues :-| Devarshi, I tried the kludge which Richard found on Stack Overflow (self.view.window.windowController.document.managedObjectContext), and it

Re: Data not retained in document based core data app with cocoa bindings

2015-10-11 Thread Richard Charles
> On Oct 11, 2015, at 2:41 AM, Devarshi Kulshreshtha > wrote: > > Looking for more clues :-| You may want to give up on storyboards and swift for the time being. There are a lot of older core data tutorials on the web that could possibly help you. You might also try a book by Hillegass. The

Re: Data not retained in document based core data app with cocoa bindings

2015-10-11 Thread Devarshi Kulshreshtha
Thank you Richard, Jerry. I tried this binding: self.view.window.windowController.document.managedObjectContext and verified by opening the saved xml document in TextEdit, it showed saved info :) but when I am trying to open it using the created app, 'DocumentSample' in my case, it is not showing

Re: Data not retained in document based core data app with cocoa bindings

2015-10-10 Thread Richard Charles
> On Oct 10, 2015, at 12:34 PM, Devarshi Kulshreshtha > wrote: > > I am sure that I am missing something over here, looking for guidance. As instructed by Jerry delete the Document from your storyboard. Courtesy of Apple and Mike Swan bind the array controller parameters managed object conte

Re: Data not retained in document based core data app with cocoa bindings

2015-10-10 Thread Jerry Krinock
Hello, Devarshi. I think that adding the Document to your storyboard was a mistake. To prove that, log self to console in Document's init function, and you will see that, when one document opens, *two* Document objects get created. Your user interface is bound to one, and the persistent store

Data not retained in document based core data app with cocoa bindings

2015-10-10 Thread Devarshi Kulshreshtha
I am trying to make a simple document based core data app using cocoa bindings by following below steps: *Step 1: *Selected the default template for a document based mac os x app with core data as enabled *Step 2:* It generated below files - *a*. AppDelegate.swift *b*. ViewController.swift *c.*