SimpleBrowser Column 0 at path
SimpleBrowser Column 0 at path
- Subject: SimpleBrowser Column 0 at path
- From: Chris Outwin <email@hidden>
- Date: Sun, 19 Jun 2005 13:09:28 -0500
I'm using Mac OS X 10.3.9 with Xcode 1.5 to build a Cocoa, document app.
After studying SimpleBrowser, I don't understand how to have the browser's column zero begin at a particular path. Such as:
/Applications / MyProgram / theFolderIWantToShowInColumnZero
SimpleBrowser constructs an absolute path using:
- (NSString*)absolutePath {
NSString *result = relativePath;
if(parentNode != nil) {
NSString *parentAbsPath = [parentNode absolutePath];
if ([parentAbsPath isEqualToString: @""]) {
parentAbsPath = @"/";
}
result = [NSString stringWithFormat: @"%@/%@", parentAbsPath, relativePath];
}
return result;
}
However, when anything other than / is used in
- (NSString*)fsPathToColumn:(int)column {
NSString *path = nil;
0) path = [NSString stringWithFormat: @"/"];
else path = [fsBrowser pathToColumn: column];
return path;
}
The parentNode tested in absolutePath() above is nil. The block in
NSString *parentAbsPath = [parentNode absolutePath];
if ([parentAbsPath isEqualToString: @""]) {
parentAbsPath = @"/";
}
result = [NSString stringWithFormat: @"%@/%@", parentAbsPath, relativePath];
in absolutePath() never executes. As a result, the path doesn't include parentAbsPath. Now real directories aren't recognized as such and won't open. The method setPath() wouldn't seem to solve the problem.
Thank you for your help. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden