#include "WOComponentFault.h"
#include "common.h"
#include <NGExtensions/NGBundleManager.h>
-#include <EOControl/EOControl.h>
+#import <EOControl/EOControl.h>
+#ifdef MULLE_EO_CONTROL
+#import <EOControl/EOKeyValueUnarchiver.h>
+#endif
#include <NGExtensions/NSString+Ext.h>
@interface WOContext(ComponentStackCount)
}
- (id)existingSession {
- if (self->session)
+ if (self->session != nil)
return self->session;
if ([[self context] hasSession])
self->context = _ctx;
}
- (WOContext *)context {
- if (self->context)
+ if (self->context != nil)
return self->context;
[self debugWithFormat:
[self errorWithFormat:@"aborting, because ctx is missing !"];
abort();
}
-
+
if (self->application == nil)
self->application = [WOApplication application];
[self _setContext:[self->application context]];
#if DEBUG && 0
[self debugWithFormat:@"KVC: accessed the component variable %@", _key];
#endif
- if ((value = [self objectForKey:_key]))
+ if ((value = [self objectForKey:_key]) != nil)
return value;
return nil;
- (void)setValue:(id)_value forUndefinedKey:(NSString *)_key {
// Note: this is not used on libFoundation, insufficient KVC implementation
+
+#if DEBUG && 0
+ [self logWithFormat:@"KVC: set the component variable %@: %@",_key,_value];
+#endif
if (_value == nil) {
#if 0
@"storing <nil> value in component variable %@", _key];
#endif
- if ([self->wocVariables objectForKey:_key])
+ if ([self->wocVariables objectForKey:_key] != nil)
[self setObject:nil forKey:_key];
return;
}
}
#endif
-
[self setObject:_value forKey:_key];
}
+
- (id)valueForUndefinedKey:(NSString *)_key {
// Note: this is not used on libFoundation, insufficient KVC implementation
#if DEBUG && 0
[self debugWithFormat:@"KVC: accessed the component variable %@", _key];
#endif
+
return [self objectForKey:_key];
}