+2005-02-04 Helge Hess <helge.hess@opengroupware.org>
+
+ * WOApplication.m: added a warning if the default component request
+ handler key is not set (v4.5.113)
+
2005-02-06 Helge Hess <helge.hess@opengroupware.org>
* DynamicElements/WOBrowser.m: fixed a warning if neither selection
@implementation WOApplication
+#if 1
+static NSString *defaultCompRqHandlerClassName = @"OWViewRequestHandler";
+#else
+static NSString *defaultCompRqHandlerClassName = @"WOComponentRequestHandler";
+#endif
+
+ (int)version {
return [super version] + 5 /* v6 */;
}
self->requestHandlerRegistry =
NSCreateMapTable(NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, 8);
- rk = [WOApplication componentRequestHandlerKey];
-#if 1
- rh = [[NSClassFromString(@"OWViewRequestHandler") alloc] init];
-#else
- rh = [[NSClassFromString(@"WOComponentRequestHandler") alloc] init];
-#endif
+ if ((rk = [WOApplication componentRequestHandlerKey]) == nil) {
+ [self logWithFormat:
+ @"WARNING: no component request handler key is specified, "
+ @"this probably means that share/ngobjweb/Defaults.plist "
+ @"could not get loaded (permissions?)"];
+ }
+ rh = [[NSClassFromString(defaultCompRqHandlerClassName) alloc] init];
if ([rk length] > 0 && (rh != nil))
[self registerRequestHandler:rh forKey:rk];
[rh release]; rh = nil;