• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SimpleBrowser Column 0 at path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Multidimensional arrays
  • Next by Date: Re: Does NSURLConnection automatically decode gzip'd data?
  • Previous by thread: Can't create bi-directional DO connection with second process
  • Next by thread: how to identify tooltip instance ?
  • Index(es):
    • Date
    • Thread