Re: Programmatic Binding KVC KVO

2009-11-04 Thread mmalc Crawford
On Nov 4, 2009, at 5:20 pm, Rob Keniger wrote: >>> See mmalc’s Graphics Bindings sample: >>> >>> http://homepage.mac.com/mmalc/CocoaExamples/controllers.html >> >> Sometimes Cocoa can be overwhelming. This will help. Thank you so much. :) > > You might also find this blog post very helpful

Re: Programmatic Binding KVC KVO

2009-11-04 Thread Rob Keniger
On 05/11/2009, at 8:42 AM, Richard Somers wrote: See mmalc’s Graphics Bindings sample: http://homepage.mac.com/mmalc/CocoaExamples/controllers.html Sometimes Cocoa can be overwhelming. This will help. Thank you so much. :) You might also find this blog post very helpful: http://

Re: Programmatic Binding KVC KVO

2009-11-04 Thread Richard Somers
On Nov 4, 2009, at 2:31 PM, Kyle Sluder wrote: This invokes the default implementation of - bind:toObject:withKeyPath:options:, which takes care of the model -> view communication. You now need to take care of the view -> model communication. As described in the User Updates a Value in the

Re: Programmatic Binding KVC KVO

2009-11-04 Thread Jim Correia
On Nov 4, 2009, at 3:17 PM, Richard Somers wrote: @interface MyView : NSView { double num; } @end @implementation MyView - (double)num { return num; } - (void)setnum:(double)newNum { [self willChangeValueForKey:@"num"]; num = newNum; [self didChangeValueForKey:@"num"]; }

Re: Programmatic Binding KVC KVO

2009-11-04 Thread Kyle Sluder
On Wed, Nov 4, 2009 at 12:17 PM, Richard Somers wrote: > All code in the custom view that touch the num property use the accessor > methods. The controller in the nib is in entity mode and bound to File's > Owner (MyDocument) managed object context. Okay, but as I said before, the default NSObjec

Re: Programmatic Binding KVC KVO

2009-11-04 Thread Richard Somers
On Nov 4, 2009, at 9:40 AM, Kyle Sluder wrote: Nib 2 only partly works. Changes made in the custom view do not show up in the managed object model or in the user interface found in nib 1. So now we also need to see your custom view code. Here is the code for nib 2 which only partly works

Re: Programmatic Binding KVC KVO

2009-11-04 Thread Kyle Sluder
On Nov 4, 2009, at 6:04 AM, Richard Somers wrote: I have a managed object context with two attached NSObjectControllers in entity mode. Both controllers control the same entity. Important: do you really mean entity, or do you mean managed object? managed object model nib 1