• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTableView data source issue - code moving from xcode 3 to xcode 4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
      • From: Fritz Anderson <email@hidden>
    • Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: return NO in tableViewSelectionDidChange: disables button cell
  • Next by Date: Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
  • Previous by thread: Re: -dateWithTimeIntervalSinceNow: 64-bits may overflow
  • Next by thread: Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
  • Index(es):
    • Date
    • Thread