On Mar 26, 2013, at 12:38 PM, Quincey Morris 
<quinceymor...@rivergatesoftware.com> wrote:

> 2. Redeclare the "delegate" property:
> 
>       @interface TKOutlineView : NSOutlineView {}
>       @property (nonatomic,readonly) id<TKOutlineViewDelegate> delegate;
>       @end
> 
>       @implementation TKOutlineView
>       @dynamic delegate;
>       …
>       [[self delegate]  outlineView:self enterKeyPressedForRow:[self 
> selectedRow]];
>       …
> 
> The @dynamic statement says "I don't have an implementation of the 'delegate' 
> property in this class, but that's just fine because it's already implemented 
> (in my superclass)".

Aha, success. Thank you - a very elegant and sensible solution.

CT


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to