/*
- Copyright (C) 2000-2003 SKYRIX Software AG
+ Copyright (C) 2000-2004 SKYRIX Software AG
- This file is part of OGo
+ This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
/*
WETreeView
<#DataCell">some content</#DataCell>
</#TestTree>
--- snap ---
+
+ TestTree.wox
+ ---snip---
+ <var:treeview list="root" sublist="item.sublist" item="item"
+ currentPath="currentPath" zoom="isZoom"
+ showItem="showItem"
+ >
+ <var:tree-header const:isTreeElement="YES">treecell</var:tree-header>
+ <var:tree-header const:isTreeElement="NO" const:bgcolor="#FFDAAA">
+ <b>first name</b>
+ </var:tree-header>
+ </var:treeview>
+ ---snap---
*/
#include <NGObjWeb/WODynamicElement.h>
#include "NGBundleManager.h"
#include "common.h"
+#include <NGExtensions/NSObject+Logs.h>
#import <Foundation/NSFileManager.h>
#import <EOControl/EOQualifier.h>
#include <ctype.h>
*/
#if !LIB_FOUNDATION_LIBRARY && !GNUSTEP_BASE_LIBRARY
-# warning incorrect behaviour if NGExtensions is dynamically loaded !
+ // Note: incorrect behaviour if NGExtensions is dynamically loaded !
// TODO: can we do anything about this? Can we detect the situation and
// print a log instead of the compile warning?
+ // Note: the above refers to the situation when a framework is implicitly
+ // loaded by loading a bundle (the framework is not linked against
+ // the main tool)
#endif
bundle = [NSBundle mainBundle];
NSMapInsert(self->classToBundle, aClass, bundle);
return nil;
}
-// initialization
+/* initialization */
- (NSString *)makeBundleInfoPath:(NSString *)_path {
#if (NeXT_Foundation_LIBRARY || APPLE_Foundation_LIBRARY) && !defined(GSWARN)
- (id)_initializeLoadedBundle:(NSBundle *)_bundle
info:(NSDictionary *)_bundleInfo
{
- id handler = nil;
+ id handler;
/* check whether a handler was specified */
-
- if ((handler = [_bundleInfo objectForKey:@"bundleHandler"])) {
+
+ if ((handler = [_bundleInfo objectForKey:@"bundleHandler"]) != nil) {
+ [self debugWithFormat:@"lookup bundle handler %@ of bundle: %@",
+ handler, _bundle];
+
if ((handler = NSClassFromString(handler)) == nil) {
NSLog(@"ERROR: did not find handler class %@ of bundle %@.",
[_bundleInfo objectForKey:@"bundleHandler"], [_bundle bundlePath]);
handler = [_bundle principalClass];
}
-
+
handler = [handler alloc];
if ([handler respondsToSelector:@selector(initForBundle:bundleManager:)])
}
}
else {
+ [self debugWithFormat:
+ @"no bundle handler, lookup principal class of bundle: %@",
+ _bundle];
if ((handler = [_bundle principalClass]) == nil)
/* use NGBundle class as default bundle handler */
handler = [NGBundle class];
return [[bundles copy] autorelease];
}
-// notifications
+/* notifications */
- (void)_bundleDidLoadNotifcation:(NSNotification *)_notification {
NSDictionary *ui = [_notification userInfo];
categories:[ui objectForKey:@"NSLoadedCategories"]];
}
+/* debugging */
+
+- (BOOL)isDebuggingEnabled {
+ return debugOn;
+}
+
@end /* NGBundleManager */
@implementation NSBundle(BundleManagerSupport)