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, 周章林 <zhanglin.z...@gmail.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to