]> err.no Git - sope/commitdiff
fixed plist parsing of rule values
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 17 Mar 2005 22:31:06 +0000 (22:31 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 17 Mar 2005 22:31:06 +0000 (22:31 +0000)
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
sope-core/NGExtensions/NGBundleManager.m
sope-core/NGExtensions/NGExtensions/NGRuleModel.h
sope-core/NGExtensions/NGRuleEngine.subproj/NGRuleParser.m
sope-core/NGExtensions/Version

index ed7092c0551f410b130b88c259f910a6928f46f1..32e198967f0090e8e3fcdc63557a711c02556a27 100644 (file)
@@ -1,3 +1,12 @@
+2005-03-17  Helge Hess  <helge.hess@opengroupware.org>
+
+       * 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  <helge.hess@opengroupware.org>
 
        * NGExtensions/NGObjectMacros.h: fixed ASSIGN, ASSIGNCOPY macros to
index ab241681c874dc0948df26fdf56ba14929ab5f99..23463b008ff7a7a2cecaadf6d3768acaa50bb2e3 100644 (file)
@@ -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];
index 1b42aa6d6c78e7f4163677ce1f51d2c83899cbe6..6ab65ad918ac0877dc753b42a351b1f4eef32d69 100644 (file)
@@ -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;
 
index ca0524342ce94a406100f63227946fd5cd8877a1..e7968464400f0d246a342b4b5415c73b68b8522b 100644 (file)
@@ -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];
index 96b00005bf4db736ddbe510ba90256d3a6f45011..41bb842eeb3a18014179d08f9b9eec94b11cff8d 100644 (file)
@@ -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