Re: NSRulerView
Re: NSRulerView
- Subject: Re: NSRulerView
- From: David Blanton <email@hidden>
- Date: Tue, 28 Jul 2009 20:37:33 -0600
Yeah, it is not clear ... I'll dig some more .... thanks anyway!
On Jul 28, 2009, at 8:26 PM, Graham Cox wrote:
On 29/07/2009, at 12:09 PM, Dave Keck wrote:
Hmm, us Americans spell it 'centimeter,' and according to the
mentioned docs, NSRulerView does too. The docs also say it supports
four different units by default (in, cm, pt, pc). Not sure what
'default' means in this case, but I'd assume it means calling
+registerUnitWithName:... is redundant for these four units. I've
never used NSRulerView, but the docs seem to imply that your code
should work. (Although it's certainly a strange style to avoid
setting
the new instance of NSRulerView to a variable before
-setMeasurementUnits: on it, even if that's the only message you send
to it; but I'm guessing that was just for brevity.)
Centimeters - well, typical of Americans to take language invented
elsewhere and 'embrace, extend and extinguish' ;-)
But yes, it does say that this is registered by default...
So maybe the problem is that the NSRulerView is being alloc/inited,
instead of simply requested from the scroll view, which will create
them for you if you use -setHasHorizontal/VerticalRuler: and get the
ruler using -horizontal/verticalRulerView.
I've never directly allocated and inited a ruler view - presumably
you'd only do this if you were using a ruler separately from a
scroll view.
--Graham
_______________________________________________
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