> A fairly simple way to implement a selection rectangle is to use > CALayer, but that only gives you the visual aspect. What does it > select? Answer that question first and that will tend to lead you to > the appropriate way to implement it.
This NSView is of an audio waveform. I currently have my drawRect: method draw the lines of my waveform, but as soon as I added a timer loop to move my playhead over the waveform as it plays, I found that this was not the right approach, as everytime the playhead moved, the parent (waveform view) would have to redraw itself, and this result in the playhead moving in an extremely choppy fashion. My next approach was to save my drawn waveform to an NSImage and use that as a background for my view... If you have a better suggestion for how I could handle this, I'd love to hear it. And to answer your question, the selection would be selecting frames of audio, so that when it is played, the playhead starts there and ends at the end of the rectangle. Patrick J. Collins http://collinatorstudios.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com