• 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
NSRulerView: Double Unit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSRulerView: Double Unit


  • Subject: NSRulerView: Double Unit
  • From: Lorenzo <email@hidden>
  • Date: Sat, 03 Jun 2006 17:32:27 +0200

Hi,
I need to configure a NSRuler to display, as QT Player does,
the current time in "seconds:frames" and not in seconds only.
For example, if the movie shown in my view runs at 30 frames per second,
and the current frame shown is the frame #75, I would like to display 2:15
(2 seconds and 15 frames) instead of 2.5 seconds.
Actually I have coded like the following, unsuccessfully.
Any idea?

float   fps = 30.0f;
upArray   = [NSArray arrayWithObjects:[NSNumber numberWithFloat:2.0], nil];
downArray = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.5],
                [NSNumber numberWithFloat:0.2], nil];

[NSRulerView registerUnitWithName:@"Seconds:Frames"
             abbreviation:@"secs:frs"
             unitToPointsConversionFactor:fps stepUpCycle:upArray
             stepDownCycle:downArray];

Best Regards
--
Lorenzo
email: email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Link error when building with Release
  • Next by Date: re: Distributing your app for other platforms
  • Previous by thread: Re: Link error when building with Release
  • Next by thread: re: Distributing your app for other platforms
  • Index(es):
    • Date
    • Thread