From 32933711d280563c7254764f70d9216f3729c5ed Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 17 Mar 2005 22:31:06 +0000 Subject: [PATCH] fixed plist parsing of rule values added classes discovery method to bundle manager git-svn-id: http://svn.opengroupware.org/SOPE/trunk@665 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-core/NGExtensions/ChangeLog | 9 +++++++++ sope-core/NGExtensions/NGBundleManager.m | 3 +-- sope-core/NGExtensions/NGExtensions/NGRuleModel.h | 3 +++ .../NGExtensions/NGRuleEngine.subproj/NGRuleParser.m | 4 ++++ sope-core/NGExtensions/Version | 2 +- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog index ed7092c0..32e19896 100644 --- a/sope-core/NGExtensions/ChangeLog +++ b/sope-core/NGExtensions/ChangeLog @@ -1,3 +1,12 @@ +2005-03-17 Helge Hess + + * v4.5.156 + + * NGBundleManager.m: implemented -classesProvidedByBundle: + + * NGRuleEngine.subproj/NGRuleParser.m: fixed parsing of array and + dictionary plist rule values + 2005-03-07 Helge Hess * NGExtensions/NGObjectMacros.h: fixed ASSIGN, ASSIGNCOPY macros to diff --git a/sope-core/NGExtensions/NGBundleManager.m b/sope-core/NGExtensions/NGBundleManager.m index ab241681..23463b00 100644 --- a/sope-core/NGExtensions/NGBundleManager.m +++ b/sope-core/NGExtensions/NGBundleManager.m @@ -678,8 +678,7 @@ static NSString *NGEnvVarPathSeparator = @":"; } - (NSArray *)classesProvidedByBundle:(NSBundle *)_bundle { - [self doesNotRecognizeSelector:_cmd]; - return nil; + return [[_bundle providedResourcesOfType:@"classes"] valueForKey:@"name"]; } - (NSArray *)classesRequiredByBundle:(NSBundle *)_bundle { [self doesNotRecognizeSelector:_cmd]; diff --git a/sope-core/NGExtensions/NGExtensions/NGRuleModel.h b/sope-core/NGExtensions/NGExtensions/NGRuleModel.h index 1b42aa6d..6ab65ad9 100644 --- a/sope-core/NGExtensions/NGExtensions/NGRuleModel.h +++ b/sope-core/NGExtensions/NGExtensions/NGRuleModel.h @@ -30,6 +30,9 @@ A rule model is a specialized sequence of rules. */ +// TODO: need some method to join two models (two allow one model being +// configured as a default but still have fallback rules in another) + @class NSArray, NSMutableArray; @class NGRule; diff --git a/sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleParser.m b/sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleParser.m index ca052434..e7968464 100644 --- a/sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleParser.m +++ b/sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleParser.m @@ -351,6 +351,10 @@ static BOOL parseDebugOn = YES; AssignmentClass = [NGRuleAssignment class]; value = [NSNull null]; } + else if (c1 == '{' || c1 == '(') { + AssignmentClass = [NGRuleAssignment class]; + value = [valstr propertyList]; + } } return [AssignmentClass assignmentWithKeyPath:key value:value]; diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version index 96b00005..41bb842e 100644 --- a/sope-core/NGExtensions/Version +++ b/sope-core/NGExtensions/Version @@ -1,6 +1,6 @@ # version -SUBMINOR_VERSION:=155 +SUBMINOR_VERSION:=156 # v4.3.115 requires libFoundation v1.0.59 # v4.2.72 requires libEOControl v4.2.39 -- 2.39.5