• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView


  • Subject: Re: NSTableView
  • From: "Shawn Erickson" <email@hidden>
  • Date: Fri, 23 May 2008 13:37:45 -0700

On Fri, May 23, 2008 at 1:22 PM, john darnell
<email@hidden> wrote:

>   If I did have, say, three tables on a dialog, how would the code know
> which function was for which table if that first element (or some other
> element) is not differentiated?

An example of one way to do it follows...

@interface MyController : NSObject {
    IBOutlet NSTableView* tableView1; // connected to table 1 in your nib
    IBOutlet NSTableView* tableView2; // connected to table 2 in your nib
    IBOutlet NSTableView* tableView3; // connected to table 3 in your nib
}
@end

@implementation MyController

- (id) tableView:(NSTableView*)aTableView ...blah...
{
    if (aTableView == tableView1) {
        ...
    } else if (aTableView == tableView2) {
        ...
    } else if (aTableView == tableView3) {
        ...
    }
}

@end
_______________________________________________

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
      • From: "john darnell" <email@hidden>
References: 
 >NSTableView (From: "john darnell" <email@hidden>)
 >Re: NSTableView (From: "David Wilson" <email@hidden>)
 >RE: NSTableView (From: "john darnell" <email@hidden>)

  • Prev by Date: Re: NSTableView
  • Next by Date: Pasteboard question
  • Previous by thread: Re: NSTableView
  • Next by thread: RE: NSTableView
  • Index(es):
    • Date
    • Thread