+2005-03-04 Helge Hess <helge.hess@opengroupware.org>
+
+ * WOComponent.m: protect component against duplicate -awake in the
+ same context as suggested by Stephane (v4.5.124)
+
2005-03-03 Helge Hess <helge.hess@opengroupware.org>
* DynamicElements/WOMetaRefresh.m: added support for 'seconds' binding
- as available in WO (v4.5.123)
+ as available in WO and suggested by Stephane (v4.5.123)
2005-03-01 Helge Hess <helge.hess@opengroupware.org>
- (id)initWithContext:(WOContext *)_ctx {
[self _setContext:_ctx];
if ((self = [self init])) {
- if (self->context)
+ if (self->context != nil)
[self ensureAwakeInContext:self->context];
else {
[self warnWithFormat:
if (debugComponentAwake)
[self debugWithFormat:@"0x%08X ensureAwakeInContext:0x%08X", self, _ctx];
- if (self->context == nil) [self _setContext:_ctx];
+ /* sanity check */
+
+ if (self->componentFlags.isAwake) {
+ if (self->context == _ctx) {
+ if (debugComponentAwake)
+ [self debugWithFormat:@"0x%08X already awake:0x%08X", self, _ctx];
+ return;
+ }
+ }
+
+ /* setup globals */
+
+ if (self->context == nil) [self _setContext:_ctx];
if (self->application == nil) self->application = [_ctx application];
if ((self->session == nil) && [_ctx hasSession])
WOComponent *child;
children = [self->subcomponents objectEnumerator];
- while ((child = [children nextObject]))
+ while ((child = [children nextObject]) != nil)
[child _awakeWithContext:_ctx];
}