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

Re: NSTableView questions


  • Subject: Re: NSTableView questions
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 6 Oct 2007 14:30:21 +0200

Am 05.10.2007 um 18:58 schrieb Chris Williams:
- You get a reference to the NSTableView by declaring a variable as such:

    (IBOutlet) NSTableView *myTable;

and connecting it in the Interface Builder. It isn't unreasonable to
declare this as an Extern even, and reference it from several code modules.

Are you sure this will compile? I never heard about being able to use "extern" with an outlet, and the brackets shouldn't work either. IBOutlet is only a marker that you put next to *instance* variables of objects (i.e. instances), so that when you drag the header onto one of Interface Builder's NIB windows to have it parsed, it'll know that this instance variable is supposed to be an outlet and that you want to be able to hook up another object in the NIB to it.


So yes, IBOutlet is what Hrishikesh will want to use here. But extern and regular variables don't enter the picture here. ALso, an extern isn't really a good design anyway. Use an accessor method on the object here.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________

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 questions
      • From: Hrishikesh Muruk <email@hidden>
    • Re: NSTableView questions
      • From: Chris Williams <email@hidden>
References: 
 >Re: NSTableView questions (From: Chris Williams <email@hidden>)

  • Prev by Date: make class cluster
  • Next by Date: Re: QT & NSData
  • Previous by thread: Re: NSTableView questions
  • Next by thread: Re: NSTableView questions
  • Index(es):
    • Date
    • Thread