[Drawkit] permanent objects

Uli Kusterer kusterer at gmail.com
Wed Jun 4 12:03:01 PDT 2008


Am 04.06.2008 um 18:52 schrieb James Maxwell:
> I'm just wondering if anyone knows how to create an object that  
> can't be deleted?
> I have a timeline-like object at the top of my window which I build  
> during my -awakeFromNib, and I don't want it to be possible to  
> delete it, or to undo its creation. And actually, while I'm on the  
> topic, I also don't want it to invoke drag and drop... Basically,  
> I'm trying to create an object which really can't be edited, in any  
> way, but I do need to detect mouseDowns on its surface (I'm using it  
> to create DKGuides).


  It sounds like you're trying to do a ruler view. I think DrawKit  
does rulers, so I'd be surprised if that wasn't what Graham is using.  
Can't you just subclass whatever ruler Graham uses and add your stuff?  
Or, come to think of it, I think you can actually have several rulers  
on a view, so you could probably create your own based on Graham's code.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de







More information about the Drawkit mailing list