• 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: Cocoa "canvas" view ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa "canvas" view ?


  • Subject: Re: Cocoa "canvas" view ?
  • From: "Kyle Sluder" <email@hidden>
  • Date: Fri, 21 Nov 2008 11:20:01 -0500

On Fri, Nov 21, 2008 at 9:50 AM, Guillaume Laurent
<email@hidden> wrote:
> Indeed I could :-). This is a very impressive work, thank you for it. Can
> you tell me more about its scalability ? What I'm planning to write is a
> music classical notation editor, so I'll typically need to handle a number
> of objects in the 10k order of magnitude, in a very large view.

In your position I would hesitate to actually model your graphical
elements as objects.  Rather, I would just have my view figure out
what portion of the score needs to be drawn, and then just draw to the
view.  Perhaps I would use a cell class like NoteCell to do the dirty
work.  My view would know how to convert bounds-oriented coordinates
into sections of staffs, and then would draw the staves, followed by
iterating through each note in each staff, calling -setObjectValue: on
the view's cell and then drawing the cell at the appropriate place.

This is conceptually similar to how NSTableView works.  It doesn't
really care about objects; the OO illusion is not necessary at the
level it's dealing with, and the complexity of dealing with it will
probably make your head spin, your app slow, or both.

--Kyle Sluder
_______________________________________________

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: Cocoa "canvas" view ?
      • From: Guillaume Laurent <email@hidden>
References: 
 >Cocoa "canvas" view ? (From: Guillaume Laurent <email@hidden>)
 >Re: Cocoa "canvas" view ? (From: Graham Cox <email@hidden>)
 >Re: Cocoa "canvas" view ? (From: Guillaume Laurent <email@hidden>)

  • Prev by Date: Re: BOOL value in Dictionary
  • Next by Date: Re: Autorelease Question
  • Previous by thread: Re: Cocoa "canvas" view ?
  • Next by thread: Re: Cocoa "canvas" view ?
  • Index(es):
    • Date
    • Thread