Re: NSView -subviews ordering?
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.