• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSRulerView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRulerView


  • Subject: Re: NSRulerView
  • From: Graham Cox <email@hidden>
  • Date: Wed, 29 Jul 2009 12:26:39 +1000


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


  • Follow-Ups:
    • Re: NSRulerView
      • From: David Blanton <email@hidden>
References: 
 >NSRulerView (From: David Blanton <email@hidden>)
 >Re: NSRulerView (From: Graham Cox <email@hidden>)
 >Re: NSRulerView (From: Dave Keck <email@hidden>)

  • Prev by Date: Re: NSRulerView
  • Next by Date: Re: Override Font Tool and Colors Tool
  • Previous by thread: Re: NSRulerView
  • Next by thread: Re: NSRulerView
  • Index(es):
    • Date
    • Thread