Custom bindings in a control/cell pair
Custom bindings in a control/cell pair
- Subject: Custom bindings in a control/cell pair
- From: Ricky Sharp <email@hidden>
- Date: Thu, 24 Feb 2005 07:29:37 -0600
I'm now adding custom bindings to my more complicated palette items. These are all control/cell pairs.
I'm wondering if it's a good idea to put the implementation for bindings completely in the cell class and just have the control class 'call through'. I don't see any problems in doing this. For example, for unbind:, the control class would simply do this:
- (void)unbind:(NSString*)aBindingName
{
[[self cell] unbind:aBindingName];
}
the control's dealloc would call its unbind: for each binding. This in turn will call through to the cell's implementation. The cell class will also have dealloc which will call its unbind: But I'm using appropriate accessors for the observed object and observed key path attributes. Thus, even though a cell's unbind can be called twice, it will only do work on the first call (will just message nil on the second pass).
Didn't see any docs or examples on this after searching a bit. Has anyone done custom bindings for a control/cell pair? I don't mind being the first :)
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden