|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Jul 1, 2004, at 11:49 PM, Bjvrn Carlstrvm wrote:_______________________________________________I'm subclassing NSOutlineView to add the possibility to delete rows through the delete key. How do I add a new method (deleteItem:) to the NSOutlineViewDataSource. Just calling it works of course but I get a warning that the method might not exist. Do I subclass the NSOutlineViewDataSource somehow ?
Just declare a new informal protocol with a name like MyOutlineViewDataSource that includes a declaration for your deleteItem: method:
@interface NSObject (MyOutlineViewDataSource)
Informal protocols are really useful for this kind of thing.
Chris Hanson <email@hidden>
cocoa-dev mailing list | email@hidden
Do not post admin requests to the list. They will be ignored.
|>Adding methods to dataSource (From: Björn Carlström <email@hidden>)|
|>Re: Adding methods to dataSource (From: Chris Hanson <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.