NSRulerView: Double Unit
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