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

subviews question


  • Subject: subviews question
  • From: Mu Lin <email@hidden>
  • Date: Wed, 30 Aug 2006 16:31:12 -0700

Hi, All:

I have a subclass of NSView say MyView only overide the drawRect method, when I obtain subviews using following lines in my appController:

MyView *aView; // outlet from nib
NSArray *mySubViews = [aView subViews];

Now the array mySubViews has some interesting properties, if a subview is added or removed from aView, mySubViews updates automatically, this is rather a surprise to me.
Seems to me - (NSArray *)subviews returns a reference of the internal data representation or it is a singleton. The docs doesn't mention anything about this. Any comments?




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: subviews question
      • From: "Michael Ash" <email@hidden>
    • Re: subviews question
      • From: Ben Lachman <email@hidden>
  • Prev by Date: Re: Newbie: window resize aloud with code?
  • Next by Date: Problem with NSBrowser
  • Previous by thread: Re: Menu item loses selectedRow?
  • Next by thread: Re: subviews question
  • Index(es):
    • Date
    • Thread