• 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
Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSTableView data source issue - code moving from xcode 3 to xcode 4 (From: Peter Hudson <email@hidden>)

  • Prev by Date: Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
  • Next by Date: Re: dataWithBytesNoCopy:length:freeWhenDone
  • Previous by thread: Re: NSTableView data source issue - code moving from xcode 3 to xcode 4
  • Next by thread: Give a menu keyboard focus - in code
  • Index(es):
    • Date
    • Thread