Skip to content

Commit

Permalink
Removed initWithStylesheet's dependence on NUIStyle.nss
Browse files Browse the repository at this point in the history
  • Loading branch information
tombenner committed Dec 30, 2012
1 parent 0a93ffa commit c330646
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions NUI/Core/NUISettings.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ @implementation NUISettings

+ (void)init
{
instance = [self getInstance];
[self initWithStylesheet:@"NUIStyle"];
}

+ (void)initWithStylesheet:(NSString *)name
+ (void)initWithStylesheet:(NSString*)name
{
instance = [self getInstance];
NUIStyleParser *parser = [[NUIStyleParser alloc] init];
Expand All @@ -27,7 +27,6 @@ + (void)initWithStylesheet:(NSString *)name

+ (BOOL)hasProperty:(NSString*)property withExplicitClass:(NSString*)className
{
instance = [self getInstance];
NSMutableDictionary *ruleSet = [instance.settings objectForKey:className];
if (ruleSet == nil) {
return NO;
Expand All @@ -51,7 +50,6 @@ + (BOOL)hasProperty:(NSString*)property withClass:(NSString*)className

+ (id)get:(NSString*)property withExplicitClass:(NSString*)className
{
instance = [self getInstance];
NSMutableDictionary *ruleSet = [instance.settings objectForKey:className];
return [ruleSet objectForKey:property];
}
Expand Down Expand Up @@ -134,7 +132,6 @@ + (NUISettings*)getInstance
if(instance == nil) {
[[NUISwizzler new] swizzleAll];
instance = [NUISettings new];
[self initWithStylesheet:@"NUIStyle"];
}
}

Expand Down

0 comments on commit c330646

Please sign in to comment.