Hallo All,

I have a view-based OutlineView  with one column bound to an TreeController 
(arrangedObjects) and the TableViewCell bound to objectValue.name. The 
TreeController is bound to the managedObjectContext.

Nearly everything is fine. With the Add-Button a new line  will be added with 
the default Value of my entity attributes. And with the Add Child Button a 
child will be added. The Remove-Butten removes the selected row. 

The only problem is, that I can’t save the values. The Save-Action in the 
AppDelegate is bound to the Save-Item of the File-Menu. If I tab cmd+s the file 
menu in the titlebar becomes blue. 

And the NSLog() I placed in the SaveAction shows that the action is called and 
no errors occur.

- (IBAction)saveAction:(id)sender {
    if (![[self managedObjectContext] commitEditing]) {
        NSLog(@"%@:%@ unable to commit editing before saving", [self class], 
NSStringFromSelector(_cmd));
    }
    
    NSError *error = nil;
    if ([[self managedObjectContext] hasChanges] && ![[self 
managedObjectContext] save:&error]) {
        [[NSApplication sharedApplication] presentError:error];
    }       

    NSLog(@"Save?");
}


But nothing will be saved. 

Many thanks for your help!

Kind regards,
Raycord  
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to