NSTableView data source issue - code moving from xcode 3 to xcode 4
NSTableView data source issue - code moving from xcode 3 to xcode 4
- Subject: NSTableView data source issue - code moving from xcode 3 to xcode 4
- From: Peter Hudson <email@hidden>
- Date: Sun, 09 Oct 2011 17:41:19 +0100
Hi There
For a long time ( in xcode 3 ) when I want to access a table view data source ( in the sub class code for the table view ) I simply called [self dataSource]
I would then call methods declared and implemented on the class which I new to be the datasource. This worked fine.
In xcode 4 ( sdk 10.7 ) the compiler throws a semantic warning when I do this. It complains that the return value from [self dataSource] is ignorant of the methods I am calling on it.
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.
This feels evil. Is there a nicer way to do this ?
Peter
_______________________________________________
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