• 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: NSView -subviews ordering?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView -subviews ordering?


  • Subject: Re: NSView -subviews ordering?
  • From: Brian Webster <email@hidden>
  • Date: Wed, 29 May 2002 09:16:59 -0500

On Tuesday, May 28, 2002, at 11:44 PM, cocoa-dev-
email@hidden wrote:

If I call an NSView instance's -subviews method to get an NSArray of all
immediate subviews of that NSView, is there any guarantee as to the
*order* of the views in the array?

I believe that the subviews will be stored in the order that you add them. That is, when you call addSubview:, NSView just tacks it on to the end of the array. However, I don't believe that this behavior is guaranteed, so it could potentially change at any time. It probably won't, but it could. If you need to keep track of your views in a particular order, you should probably maintain your own array for doing so.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: applescript: recordability
  • Next by Date: Re: is the mouse button pressed?
  • Previous by thread: NSView -subviews ordering?
  • Next by thread: Re: NSView -subviews ordering?
  • Index(es):
    • Date
    • Thread