Are you exposing the binding first?
+ (void)exposeBinding:(NSString *)binding
Thanks,
Chaitanya Pandit
Chief Architect
Expersis Software Inc.
On May 18, 2010, at 7:47 PM, Richard Somers wrote:
> I have an issue that has me absolutely stumped. I have a custom view using a
> custom layer. When 'bind:toObject:withKeyPath:options:' is called after
> 'setView' the binding works. When it is called before 'setView' the binding
> does not work.
>
> // MyCustomView (this version works)
> - (void)awakeFromNib
> {
> layer = [[MyCustomLayer alloc] init];
> [layer setView:self];
> [layer bindFoo]; // bind works
> ...
> }
>
> // MyCustomView (this version does not work)
> - (void)awakeFromNib
> {
> layer = [[MyCustomLayer alloc] init];
> [layer bindFoo]; // bind does not work
> [layer setView:self];
> ...
> }
>
> // MyCustomOpenGLLayer
> @property (retain) MyCustomView *view;
> @synthesize view;
>
> - (void)bindFoo
> {
> [self bind:@"foo"
> toObject:[NSUserDefaultsController sharedUserDefaultsController]
> withKeyPath:@"values.foo"
> options:nil];
> }
>
> Any ideas why the first version works but not the second?
>
> --Richard
>
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/chaitanya%40expersis.com
>
> This email sent to [email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]