Re: How to handle document scaling in an NSRulerView Client?
Re: How to handle document scaling in an NSRulerView Client?
- Subject: Re: How to handle document scaling in an NSRulerView Client?
- From: Dave Fernandes <email@hidden>
- Date: Sat, 13 Dec 2008 10:50:40 -0500
I can't say whether Apple designed it this way, but it's been working
for me to call registerUnitWithName with the conversion factor and
then [theRuler setMeasurementUnits:measurementName] immediately after
changing the measurement units.
This works even if you have multiple views using the same registered
measurement unit, but with different conversion factors. The
setMeasurementUnits method must be copying the conversion factor in
effect at the time of the call.
(I hope someone will correct me if I'm doing anything that's not
blessed by the Cocoa framework.)
Dave
On Dec 13, 2008, at 8:11 AM, Carlos Eduardo Mello wrote:
On Dec 13, 2008, at 3:17AM, Dave Fernandes wrote:
Not sure if I'm missing your point, but you can always call
registerUnitWithName again with the new conversion factor after
changing the view scale.
<newbie-sindrome>
With the same unit name? That's weird. Given the method name, and
the fact that it's a class method, I had the impression this was a
more or less global/permanent setting for the ruler, and that
somehow I would need to unregister the unit before defining another
one with the same name.
</newbie-sindrome>
_______________________________________________
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