[Drawkit] permanent objects

James Maxwell jbmaxwell at rubato-music.com
Wed Jun 4 14:44:52 PDT 2008


Thanks, Uli.

Well, yes, t is basically a ruler, but looking into NSRulerView, it  
seems like it might be a bit complicated to do what I'm planning on  
doing. I want multiple horizontal rulers in my new, and I'm going to  
be creating these dynamically, as well - basically, whenever a new  
guide is added, a new "ruler" will be added, starting again from zero  
(well, one actually). I'll dig around to see if Graham used something  
other than the NSRulerView (i.e.,  a subclass), but I think it will  
behave in basically the same way. The other thing is that I'm going to  
allow the user to change the division on each ruler, independently of  
the others (it's a musical time thing). I kind of feel like  
NSRulerViews will become cumbersome doing this kind of thing... But  
I'll look more thoroughly into NSRulerView, or whatever Graham is  
using, before I rule it out (pun honestly not intended!).

cheers,

J.


On 4-Jun-08, at 12:03 PM, Uli Kusterer wrote:

> 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
>
>
>
>
>
> _______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net



More information about the Drawkit mailing list