• 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: NSTableview background image for column?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableview background image for column?


  • Subject: Re: NSTableview background image for column?
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 25 Apr 2010 10:23:48 -0700

On Apr 24, 2010, at 12:52 PM, Izak van Langevelde <email@hidden> wrote:

The table shows a so-called 'exposure sheet' for an animation, where each row corresponds to one frame, and the columns correspond to the various foreground and background animation layers. There is one column for audio, and for synchronization purposes it is nice to show a wave form of the audio. However, the waveform is fixed, i.e. not editable, so adding and deleting table rows only affects the position fn table rows with respect to the audio: the audio is background, both as audio and as picture. Columns are not sortable, although it would be nice to be able to reorder them.

It sounds like you're going for something similar to what you'd see if you looked at a reel of 8mm film.


Since at some point you have to generate the entire waveform as one image, I'd probably use a custom NSCell subclass in the appropriate column, and point it at the NSImage that contains your waveform. Then when the tableview goes to draw that cell in a row (I believe the delegate method informing you of this is called - tableView:willDisplayCell: or something similar) I'd poke the cell to tell it what offset into the image it should draw. The cell's drawing method would then draw the subset of the waveform image.

This avoids the problem you describe of creating tons of image slices; there's only one NSImage object but your cells are smart enough to share it and only draw the relevant parts when asked.

HTH,
--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


References: 
 >NSTableview background image for column? (From: Izak van Langevelde <email@hidden>)
 >Re: NSTableview background image for column? (From: Andy Lee <email@hidden>)
 >Re: NSTableview background image for column? (From: Izak van Langevelde <email@hidden>)

  • Prev by Date: Re: How do I get a file reference w/o relying on the path?
  • Next by Date: Re: UIResponder Woes
  • Previous by thread: Re: NSTableview background image for column?
  • Next by thread: Re: NSTableview background image for column?
  • Index(es):
    • Date
    • Thread