• 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
Custom view instantiated twice?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom view instantiated twice?


  • Subject: Custom view instantiated twice?
  • From: Nick Pilch <email@hidden>
  • Date: Fri, 22 Aug 2008 16:49:35 -0700

I have an NSView subclass defined in IB. It's a custom object in my nib and it's a child of a window's content view. I have an outlet defined in the NSView subclass that's bound to a static text field within my custom view.

Upon running the app, two instances of my custom NSView class are created. In one of them, my outlet is bound correctly, but [view subviews] returns an empty array. In the other instance, my outlet is not bound (it's nil), but subviews returns the correct result (it shows the static text field)! In subsequent callbacks to my class, it's the instance whose outlet is not bound that is called.

Any help?

Xcode 3.1, BTW.

------------------------------------------------

Nick Pilch / Tacit Knowledge, LLC
email@hidden
Cell: 510-381-6777



_______________________________________________

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: Custom view instantiated twice?
      • From: Andy Lee <email@hidden>
  • Prev by Date: Getting the active web page edit field for a WebView
  • Next by Date: Re: Custom view instantiated twice?
  • Previous by thread: Getting the active web page edit field for a WebView
  • Next by thread: Re: Custom view instantiated twice?
  • Index(es):
    • Date
    • Thread