Moved FontSizetoLineHeightTransformer registration code to AppControler's +initialize.
parent
e65deb9d82
commit
ea427c9033
|
@ -8,14 +8,21 @@
|
|||
#import "OpenURLPanel.h"
|
||||
#import "SpotlightWindowController.h"
|
||||
#import "StringToURLTransformer.h"
|
||||
#import "FontSizetoLineHeightTransformer.h"
|
||||
|
||||
@implementation AppController
|
||||
|
||||
+ (void)initialize
|
||||
{
|
||||
// Register transformers
|
||||
NSValueTransformer *stringToURLTransformer = [[[StringToURLTransformer alloc] init]autorelease];
|
||||
[NSValueTransformer setValueTransformer:stringToURLTransformer
|
||||
forName:@"StringToURLTransformer"];
|
||||
|
||||
NSValueTransformer *fontSizetoLineHeightTransformer =
|
||||
[[[FontSizetoLineHeightTransformer alloc] init]autorelease];
|
||||
[NSValueTransformer setValueTransformer:fontSizetoLineHeightTransformer
|
||||
forName:@"FontSizetoLineHeightTransformer"];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,14 +11,6 @@
|
|||
|
||||
@implementation FontSizetoLineHeightTransformer
|
||||
|
||||
+ (void)initialize
|
||||
{
|
||||
NSValueTransformer *fontSizetoLineHeightTransformer =
|
||||
[[[FontSizetoLineHeightTransformer alloc] init]autorelease];
|
||||
[NSValueTransformer setValueTransformer:fontSizetoLineHeightTransformer
|
||||
forName:@"FontSizetoLineHeightTransformer"];
|
||||
}
|
||||
|
||||
+ (Class)transformedValueClass { return [NSNumber class]; }
|
||||
+ (BOOL)allowsReverseTransformation { return NO; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue