Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
- Subject: Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
- From: Fritz Anderson <email@hidden>
- Date: Sun, 09 Oct 2011 12:03:46 -0500
On 9 Oct 2011, at 11:41 AM, Peter Hudson wrote:
> I have found a solution in overriding the dataSource method in my table view subclass and simply returning [self dataSource] cast to the class which I know the datasource to be.
Why override the method, when all you can just cast the return value?
@implementation MyTableViewClass
- (void) myMethod
{
DataSourceClass * aVar = (DataSourceClass *) [self dataSource];
// ...
}
// ...
@end
You will have to make sure that DataSourceClass declares it complies with <NSTableViewDataSource>.
— F
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden