• 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: Why IBOutlet don't work under NSTableCellView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why IBOutlet don't work under NSTableCellView?


  • Subject: Re: Why IBOutlet don't work under NSTableCellView?
  • From: Bryan Vines <email@hidden>
  • Date: Fri, 08 Nov 2013 08:21:24 -0600

Hello,

I'm just beginning to explore view-based tableviews myself.

When I build and run this project, Xcode shows two warnings of interest:
  - Outlet 'ref' of 'My Image' is connected to 'My Reference,' an invalid destination (Objects inside view based table views may only be connected to the table view's delegate.)
  - Outlet 'delegate' of 'Text Field - Table View Cell' is connected to 'My Reference,' an invalid destination (Objects inside view based table views may only be connected to the table view's delegate.)

The linked tutorial, below, has helped me a great deal with regard to view-based tableviews.

    http://gentlebytes.com/blog/2011/08/30/view-based-table-views-in-lion-part-1-of-2/

Hope that helps!
--
Bryan Vines

On Oct 30, 2013, at 4:49 AM, 周章林 <email@hidden> wrote:

> Hi, all,
>
> I am trying to use NSTableView in our project, and I customized class which
> inherit NSImageView, that's MyImage. In MyImage, I declared a property
> (IBOutlet) "ref". Then I insert this customized view to NSTableCellView in
> Interface Builder, and I connect "ref" with a customized
> class-"MyReference" object . The problem is "ref" is always nil in the
> MyImage instance.
>
> I have tried to set breakpoint in the -[MyImage initWithFrame:] and
> -[MyImage setRef:], and found the former method is invoked 2 times, but the
> later only once. Can anybody explain why this happen? And I want to make
> the "ref" outlet work, what should I do?
>
> I also attached the sample project in attachment.

_______________________________________________

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


  • Prev by Date: Re: Apple Sample Code WWDC 2010 session 114
  • Next by Date: Re: SKIndexAddDocument crashing
  • Previous by thread: NSScrollView and autolayout
  • Next by thread: Re: Why IBOutlet don't work under NSTableCellView?
  • Index(es):
    • Date
    • Thread