• 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: "john darnell" <email@hidden>
  • Date: Fri, 23 May 2008 16:14:16 -0500
  • Thread-topic: NSTableView

Got it!  Thank you!

John

-----Original Message-----
From: Shawn Erickson [mailto:email@hidden]
Sent: Friday, May 23, 2008 3:38 PM
To: john darnell
Cc: email@hidden
Subject: Re: NSTableView

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

References: 
 >NSTableView (From: "john darnell" <email@hidden>)
 >Re: NSTableView (From: "David Wilson" <email@hidden>)
 >RE: NSTableView (From: "john darnell" <email@hidden>)
 >Re: NSTableView (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: Removing the Filename flag in Doc. based Application
  • Next by Date: Re: A documetation suggestion (was Re: Cocoa et al as HCI usability problem)
  • Previous by thread: Re: NSTableView
  • Next by thread: Re: NSTableView
  • Index(es):
    • Date
    • Thread