• 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: Doe each NSTableView requires its own controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doe each NSTableView requires its own controller?


  • Subject: Re: Doe each NSTableView requires its own controller?
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 28 Jan 2004 00:00:18 -0800

On Jan 27, 2004, at 10:42 PM, email@hidden wrote:

In my application I'm about to add an additional NSTableView instance. Do I now need to create a new controller to implement its delegate methods?

No.

Most likely scenario: your controller will have two instance variables (outlets), tableView1 and tableView2. Your controller will also implement the NSTableView data source and delegate methods. The first parameter in all of these is the table view sending the message. Your implementations therefore check which tableview is sending the message before returning the appropriate value.

e.g.
- (int)numberOfRowsInTableView:(NSTableView *)tableView
{
if (tableView == tableView1)
{
return [array1 count];
}
return [array2 count];
}

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Doe each NSTableView requires its own controller?
      • From: "M. Uli Kusterer" <email@hidden>
References: 
 >Doe each NSTableView requires its own controller? (From: email@hidden)

  • Prev by Date: Re: Any new/updated Cocoa books soon?
  • Next by Date: Re: Any new/updated Cocoa books soon?
  • Previous by thread: Re: Doe each NSTableView requires its own controller?
  • Next by thread: Re: Doe each NSTableView requires its own controller?
  • Index(es):
    • Date
    • Thread