Re: Include an executable without hard coding the path
Re: Include an executable without hard coding the path
- Subject: Re: Include an executable without hard coding the path
- From: Greg Guerin <email@hidden>
- Date: Sat, 18 Jul 2009 08:30:18 -0700
Subject: Re: Include an executable without hard coding the path
From: Rick Schmidt <email@hidden>
Date: Sat, 18 Jul 2009 01:24:01 -0500
s=gamma; h=domainkey-signature:mime-version:received:in-reply-
to:references :from:date:message-id:subject:to:cc:content-
type :content-transfer-encoding;
bh=yikKCiSCXi3Luv2mjC7DKCCYPCcEoqdL4yUV4eZUPGs=;
b=PsiUvpVk09hMNPHnadCULTCTjwKmeqwXWP9uBMb9SOHj3wHIvaQOK+KM2BTkUplNmA
RnpnrUtipgG8GUZtYwpGbKk1RUaSsAsQWqJgdTeoyKS1g1EZdMQE8Tdly8S0rZtS0SLR
bv3xWjo37z/0qhJLU8yPxNLyj9Zu5qCveiqHQ=
h=mime-version:in-reply-to:references:from:date:message-
id:subject:to :cc:content-type:content-transfer-encoding;
b=YolDZ1HK9T84pJdOxkzuna89OBown+Cm5pSUp2m2wACUEnjPY18QLsZD3zibgse56Y
PTVFKVu1XMYgWaiAoUlLCerfF3A2k/IoT+zX9B75UEnpuiaGBUevz2oF4Vf4STyDbWVg
XVql7zTU9pA7HK3kvzjE8CYHkQQMxXOjuUGVQ=
Thanks Marcos I got that to work for the executable. Getting the path
to the sequence input file is another story. As far as I can see
NSBundle can only be assigned to an NSString. I have to get it as a
char* because I have to pass it into a c++ tool I didn't write. So
the the NSString has to go to a const char * and then a strcpy from
const char * to char *. It seems like it should be easier and its not
quite working yet.
NSString has methods that return char* or that copy into a designated
char buffer.
Read the class reference doc for NSString. Xcode has this doc under
its builtin Help system.
For example: -length, -lengthOfBytesUsingEncoding:.
Also: – getCString:maxLength:encoding:,
– UTF8String
Finally: -fileSystemRepresentation,
-getFileSystemRepresentation:maxLength:
I suspect getFileSystemRepresentation:maxLength is going to be the
most useful for getting a pathname out of an NSString, but you should
at least read the docs for the others so you know why.
-- GG
_______________________________________________
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