]> err.no Git - sope/commitdiff
minor code cleanups
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 19 Jul 2005 10:06:33 +0000 (10:06 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 19 Jul 2005 10:06:33 +0000 (10:06 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@913 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/WOExtensions/ChangeLog
sope-appserver/WOExtensions/Version
sope-appserver/WOExtensions/WOKeyValueConditional.m

index 93da8057ec24750cf6107aca5979463ef786e48c..959a3df448b5858d415082a4b32befb3f4e1db88 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-19  Helge Hess  <helge.hess@opengroupware.org>
+
+       * WOKeyValueConditional.m: minor code cleanups (v4.5.26)
+
 2005-07-11  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * WOExtensions-Info.plist: corrected bundle identifier
index a80a0e234e956d82ad15bfc96407503f4de1d0f0..b7aa6f0418489b9b5a2567f91d1394bcd4de3463 100644 (file)
@@ -1,6 +1,6 @@
 # Version file
 
-SUBMINOR_VERSION:=25
+SUBMINOR_VERSION:=26
 
 # v4.5.23 requires libNGObjWeb v4.5.145
 # v4.5.22 requires libNGObjWeb v4.5.106
index b5c64b837c2bb9934b6821d6f1f870843a273ee9..60ddbf036acfb4418d7b27f084c49213e65ce7eb 100644 (file)
     self->key      = WOExtGetProperty(_config, @"key");
     self->value    = WOExtGetProperty(_config, @"value");
     self->negate   = WOExtGetProperty(_config, @"negate");
-    self->template = RETAIN(_c);
+    self->template = [_c retain];
   }
   return self;
 }
 
-#if !LIB_FOUNDATION_BOEHM_GC
 - (void)dealloc {
-  RELEASE(self->template);
-  RELEASE(self->value);
-  RELEASE(self->key);
+  [self->template release];
+  [self->value    release];
+  [self->key      release];
   [super dealloc];
 }
-#endif
 
-// accessors
+/* accessors */
 
 - (WOElement *)template {
   return self->template;
 }
 
-// state
+/* state */
 
 static inline BOOL _doShow(WOKeyValueConditional *self, WOContext *_ctx) {
   WOComponent *c       = [_ctx component];
@@ -87,14 +85,12 @@ static inline BOOL _doShow(WOKeyValueConditional *self, WOContext *_ctx) {
   return doNegate ? !doShow : doShow;
 }
 
-// ******************** responder ********************
+/* handling requests */
 
-- (void)takeValuesFromRequest:(WORequest *)_request
-  inContext:(WOContext *)_ctx
-{
+- (void)takeValuesFromRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
   if (_doShow(self, _ctx)) {
     [_ctx appendElementIDComponent:@"1"];
-    [self->template takeValuesFromRequest:_request inContext:_ctx];
+    [self->template takeValuesFromRequest:_rq inContext:_ctx];
     [_ctx deleteLastElementIDComponent];
   }
 #if 0
@@ -106,7 +102,7 @@ static inline BOOL _doShow(WOKeyValueConditional *self, WOContext *_ctx) {
 #endif
 }
 
-- (id)invokeActionForRequest:(WORequest *)_request inContext:(WOContext *)_ctx {
+- (id)invokeActionForRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
   NSString *state;
 
   state = [[_ctx currentElementID] stringValue];
@@ -118,7 +114,7 @@ static inline BOOL _doShow(WOKeyValueConditional *self, WOContext *_ctx) {
       id result;
       
       [_ctx appendElementIDComponent:state];
-      result = [self->template invokeActionForRequest:_request inContext:_ctx];
+      result = [self->template invokeActionForRequest:_rq inContext:_ctx];
       [_ctx deleteLastElementIDComponent];
 
       return result;
@@ -138,14 +134,14 @@ static inline BOOL _doShow(WOKeyValueConditional *self, WOContext *_ctx) {
 /* description */
 
 - (NSString *)associationDescription {
-  NSMutableString *str = [[NSMutableString alloc] init];
+  NSMutableString *str;
 
+  str = [NSMutableString stringWithCapacity:64];
   if (self->key)      [str appendFormat:@" key=%@",      self->key];
   if (self->value)    [str appendFormat:@" value=%@",    self->value];
   if (self->negate)   [str appendFormat:@" negate=%@",   self->negate];
   if (self->template) [str appendFormat:@" template=%@", self->template];
-  
-  return AUTORELEASE(str);
+  return str;
 }
 
 @end /* WOKeyValueConditional */