ADC Home > Reference Library > Reference > Audio > Carbon > Disc Recording Framework Reference

 


DRMSFFormatter

Inherits from:
Declared In:

Overview

NSFormatter subclass

Discussion

Instances of DRMSFFormatter format the textual representation of cells that contain MSF objects and convert textual representations of msf values into MSF objects. DRMSFFormatters are typically instantiated in IB using the DiscRecording Interface builder palette.



Methods

-format
Returns the format string to the caller
-initWithFormat:
Initializes the formatter with the format string
-setFormat:
Sets the format string of the receiver

format


Returns the format string to the caller

- (NSString*) format; 


initWithFormat:


Initializes the formatter with the format string

- (id) initWithFormat:(NSString*)format; 
Parameters
format
An NString specifying the printf-style format string.
Return Value

A DRMSFFormatter


setFormat:


Sets the format string of the receiver

- (void) setFormat:(NSString*)format; 
Parameters
format
An NString specifying the printf-style format string.
Discussion

The format string is very similar to a printf-style format string with %-escaped formatting characters.



In addition to these formatting characters an optional length specifier can come between then % and the formatting character. This length specifier will force the field in question to be at least that wide. for example a format specifier of "%02m:%02s" will cause a DRMSF object representing 3 minutes 9 seconds to be formatted as "03:09".

A formatter is aware of and respects rounding. If a bit of the msf is not zero, but the format does not display that value, the next higher value will be increased by one to reflect that. Extending our example above, an DRMSF with a value of 3 minutes, 9 seconds, 15 frames using a format specfier of "%02m:%02s", will be formatted as "03:10" since the 15 frames rounds up the seconds to the next value


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-04-01