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

Re: Name of NSTableView


  • Subject: Re: Name of NSTableView
  • From: "Adam Gerson" <email@hidden>
  • Date: Wed, 2 Apr 2008 20:41:33 -0400

All good ideas from Andy. I sometimes get arround this issue by using
the "tag" in IB. It has to be an int so I define

#define TABLE1 1
#define TABLE2 2
#define TABLE3 3

Then you can get a reference to your table with

if ([tableView tag] == TABLE3)
{
//code
}


On Wed, Apr 2, 2008 at 6:07 PM, Jens Alfke <email@hidden> wrote:
>
>  On 2 Apr '08, at 2:52 PM, Mr. Gecko wrote:
>
>  >>> How would I get the name of a table view? I am trying to make all
>  >>> of my tables use one class for the data source so I can make my
>  >>> code more smaller.
>
>  Why does your code need to be smaller? How big is it? This sounds like
>  something that would really complicate the code and make it harder to
>  read. The computer's disk space and RAM are less important [within
>  limits!] than your development and coding time.
>
>  In any case, I don't recommend trying to put special cases in your
>  code that looks at some identifier of the table. Instead, subclass a
>  base class.
>
>
>  > I did that before but I can't do shouldSelectRow with that which I
>  > need for filling out fields once a row is selected.
>
>  I don't understand...
>
>  —Jens
> _______________________________________________
>
>  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
>
_______________________________________________

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: Name of NSTableView
      • From: Jonathan Hess <email@hidden>
References: 
 >Name of NSTableView (From: "Mr. Gecko" <email@hidden>)
 >Re: Name of NSTableView (From: John Stiles <email@hidden>)
 >Re: Name of NSTableView (From: "Mr. Gecko" <email@hidden>)
 >Re: Name of NSTableView (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Subviews of a borderless window - autoresizing mask does not work for me
  • Next by Date: About the Primary Button problems in Cocoa Mouse Event Handling
  • Previous by thread: Re: Name of NSTableView
  • Next by thread: Re: Name of NSTableView
  • Index(es):
    • Date
    • Thread