• 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 and array of moveable NSImages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView and array of moveable NSImages


  • Subject: Re: NSView and array of moveable NSImages
  • From: "Fen Soares" <email@hidden>
  • Date: Fri, 6 Apr 2007 09:10:00 +0100

On 05/04/07, I. Savant <email@hidden> wrote:

On 4/5/07, Scott Anguish <email@hidden> wrote:

> Actually, I used a double linked list, since this made it easy to
> traverse into groups, and move items around wholesale.  But this was
> a large, large scale package that often had 50,000 items to deal with.

I've done very little drawing of this nature (with mutable z-order),
so this is as enlightening to me as I'm sure it is to Fen. Thanks for
the insight!

--
I.S.



Great stuff guys!

The quickest implementation was just to insert new items into my mutable
array at index 0 and let them stack up that way. A simple 'reverse
enumeration' displays them hierarchically with 0 appearing ontop, and then
the intersection test is a simple 'forward enumeration' and break on
intersection with whatever we hit first in the array that overlaps. This
retains the logic of 0-zindex being topmost.

It's good enough for now, but Scott's suggestion is definitely a good'un for
future ref.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >NSView and array of moveable NSImages (From: "Fen Soares" <email@hidden>)
 >Re: NSView and array of moveable NSImages (From: Scott Anguish <email@hidden>)
 >Re: NSView and array of moveable NSImages (From: "I. Savant" <email@hidden>)
 >Re: NSView and array of moveable NSImages (From: Scott Anguish <email@hidden>)
 >Re: NSView and array of moveable NSImages (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Seeing which page Safari is currently browsing
  • Next by Date: Re: How to ask for and utilize a user's password?
  • Previous by thread: Re: NSView and array of moveable NSImages
  • Next by thread: Re: NSView and array of moveable NSImages
  • Index(es):
    • Date
    • Thread