Re: signal 11 (SIGSEGV) error
Re: signal 11 (SIGSEGV) error
- Subject: Re: signal 11 (SIGSEGV) error
- From: Sandy Santra <email@hidden>
- Date: Fri, 24 Apr 2009 10:23:22 -0400
Thanks for the help, Shawn, Scott, and Joar. I took out the [path
release] command and am no longer having (those) problems with the
debugger. The initial code has been cleaned up from
NSString *path = @"~";
NSString *expandedPath = [expandedPath stringByExpandingTildeInPath];
to
NSString *path = @"~";
path = [path stringByExpandingTildeInPath];
to
NSString *path = [@"~" stringByExpandingTildeInPath];
to
NSString *path = NSHomeDirectory();
Nice!
Now I have
void PrintPathInfo() {
NSString *path = NSHomeDirectory(); //Sets NSString object
"path" to home directory
NSLog(@"My home folder is at '%@'.", path); //Prints to log
screen full home directory path
NSArray *pathComponents = [path pathComponents]; //Sets up array
for each of the path components
for (NSString *element in pathComponents) { //Uses "fast
enumeration" to iterate through
NSLog(@"%@", element); //path components and print each to
log screen
}
}
and am a very happy camper!
Thanks again.
--Sandy Santra
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden