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 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]

Reply via email to