Fixed some things. Made pathnode url KVC compliant.

CQTexperiment
vspader 2008-02-20 01:01:15 +00:00
parent b15e4f626a
commit 7462169ba3
4 changed files with 10 additions and 8 deletions

View File

@ -44,7 +44,7 @@
- (NSURL *)rootURL - (NSURL *)rootURL
{ {
return [rootNode url]; return [rootNode URL];
} }
- (void)setRootURL: (NSURL *)rootURL - (void)setRootURL: (NSURL *)rootURL
@ -71,7 +71,7 @@
NSLog(@"COMPONENT: %@", c); NSLog(@"COMPONENT: %@", c);
BOOL found = NO; BOOL found = NO;
for (PathNode *subnode in [node subpaths]) { for (PathNode *subnode in [node subpaths]) {
if ([[[[subnode url] path] lastPathComponent] isEqualToString:c]) { if ([[[[subnode URL] path] lastPathComponent] isEqualToString:c]) {
node = subnode; node = subnode;
found = YES; found = YES;
} }
@ -132,7 +132,7 @@
NSMutableArray *urls = [NSMutableArray arrayWithCapacity:[items count]]; NSMutableArray *urls = [NSMutableArray arrayWithCapacity:[items count]];
for (id p in items) { for (id p in items) {
[urls addObject:[p url]]; [urls addObject:[p URL]];
} }
NSLog(@"URLS: %@", urls); NSLog(@"URLS: %@", urls);
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPboardType,nil] owner:nil]; //add it to pboard [pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPboardType,nil] owner:nil]; //add it to pboard

View File

@ -24,7 +24,7 @@
- (id)initWithDataSource:(FileTreeDataSource *)ds url:(NSURL *)u; - (id)initWithDataSource:(FileTreeDataSource *)ds url:(NSURL *)u;
- (NSURL *)url; - (NSURL *)URL;
- (void)setURL:(NSURL *)url; - (void)setURL:(NSURL *)url;
- (void)processPaths: (NSArray *)contents; - (void)processPaths: (NSArray *)contents;

View File

@ -76,7 +76,7 @@ NSURL *resolveAliases(NSURL *url)
[icon setSize: NSMakeSize(16.0, 16.0)]; [icon setSize: NSMakeSize(16.0, 16.0)];
} }
- (NSURL *)url - (NSURL *)URL
{ {
return url; return url;
} }
@ -89,7 +89,9 @@ NSURL *resolveAliases(NSURL *url)
{ {
NSMutableArray *newSubpaths = [[NSMutableArray alloc] init]; NSMutableArray *newSubpaths = [[NSMutableArray alloc] init];
for (NSString *s in contents) NSEnumerator *e = [contents objectEnumerator];
NSString *s;
while ((s = [e nextObject]))
{ {
if ([s characterAtIndex:0] == '.') if ([s characterAtIndex:0] == '.')
{ {

View File

@ -36,8 +36,8 @@
+ (void)initialize { + (void)initialize {
[self setKeys:[NSArray arrayWithObjects:@"artist",@"title",nil] triggerChangeNotificationsForDependentKey:@"display"]; [self setKeys:[NSArray arrayWithObjects:@"artist",@"title",nil] triggerChangeNotificationsForDependentKey:@"display"];
[self setKeys:[NSArray arrayWithObjects:@"totalFrames",nil] triggerChangeNotificationsForDependentKey:@"length"]; [self setKeys:[NSArray arrayWithObjects:@"totalFrames",nil] triggerChangeNotificationsForDependentKey:@"length"];
[self setKeys:[NSArray arrayWithObjects:@"url",nil] triggerChangeNotificationsForDependentKey:@"path"]; [self setKeys:[NSArray arrayWithObjects:@"URL",nil] triggerChangeNotificationsForDependentKey:@"path"];
[self setKeys:[NSArray arrayWithObjects:@"url",nil] triggerChangeNotificationsForDependentKey:@"filename"]; [self setKeys:[NSArray arrayWithObjects:@"URL",nil] triggerChangeNotificationsForDependentKey:@"filename"];
} }
- (void)setProperties:(NSDictionary *)dict - (void)setProperties:(NSDictionary *)dict