Thanks for all the feed back, its been most helpful.
-Kevin
On Mar 15, 2008, at 12:04 PM, Kevin Dixon wrote:
I'm trying to write a method that will convert a NSString containing a
file system URL to an FSRef with the following code
- (FSRef)stringToFSRef: (NSString*)filePath {
FSRef
Kevin,
Here's two variants that you can start to work with. Use the first
one if it works. The second one is a more roundabout way of getting
the NSString to bytes.
Two disclaimers:
1: I have never worked with CF functions before, but have been doing
a bit of string-data-bytes
On Sat, Mar 15, 2008 at 2:04 PM, Kevin Dixon [EMAIL PROTECTED] wrote:
Also, is there a better way to accomplish this?
There are a lot of buggy or unnecessarily complex answers in this thread.
Use the code at the bottom of this CocoaDev link and be done with it:
On Mar 16, 2008, at 10:11, stephen joseph butler wrote:
On Sat, Mar 15, 2008 at 2:04 PM, Kevin Dixon [EMAIL PROTECTED] wrote:
Also, is there a better way to accomplish this?
There are a lot of buggy or unnecessarily complex answers in this
thread.
Use the code at the bottom of this
Le 16 mars 08 à 07:49, Stuart Malin a écrit :
Kevin,
Here's two variants that you can start to work with. Use the first
one if it works. The second one is a more roundabout way of getting
the NSString to bytes.
Two disclaimers:
1: I have never worked with CF functions before, but have
Jens,
Thank you for pointing these out. I provided the info I did because I
hadn't seen anyone else reply to Kevin with detailed code
suggestions, but rather, vague suggestions. I stated clearly that my
suggestion was from a Cocoa perspective on how to convert NSString to
bytes, and
On Sun, Mar 16, 2008 at 5:41 AM, Nir Soffer [EMAIL PROTECTED] wrote:
On Mar 16, 2008, at 10:11, stephen joseph butler wrote:
On Sat, Mar 15, 2008 at 2:04 PM, Kevin Dixon [EMAIL PROTECTED] wrote:
Also, is there a better way to accomplish this?
There are a lot of buggy or
On Mar 16, 2008, at 11:15 AM, Michael Ash wrote:
On Sun, Mar 16, 2008 at 5:41 AM, Nir Soffer [EMAIL PROTECTED]
wrote:
On Mar 16, 2008, at 10:11, stephen joseph butler wrote:
On Sat, Mar 15, 2008 at 2:04 PM, Kevin Dixon [EMAIL PROTECTED]
wrote:
Also, is there a better way to accomplish
I'm trying to write a method that will convert a NSString containing a
file system URL to an FSRef with the following code
- (FSRef)stringToFSRef: (NSString*)filePath {
FSRef output;
CFStringRef cfFilePath = CFStringCreateWithCString(NULL, [filePath
cString],
On Mar 15, 2008, at 12:04 PM, Kevin Dixon wrote:
I'm trying to write a method that will convert a NSString containing a
file system URL to an FSRef with the following code
- (FSRef)stringToFSRef: (NSString*)filePath {
FSRef output;
CFStringRef cfFilePath =
Le 15 mars 08 à 20:04, Kevin Dixon a écrit :
I'm trying to write a method that will convert a NSString containing a
file system URL to an FSRef with the following code
- (FSRef)stringToFSRef: (NSString*)filePath {
FSRef output;
CFStringRef cfFilePath =
-cString has been deprecated for a very long time; it's better to
use UTF8String.
Not all file systems support UTF8, you should use -
fileSystemRepresentation instead for compatability.
Keith
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
On Mar 15, 2008, at 12:34 PM, Keith Duncan wrote:
-cString has been deprecated for a very long time; it's better to
use UTF8String.
Not all file systems support UTF8, you should use -
fileSystemRepresentation instead for compatability.
For some APIs, but not in this case. The OP is
13 matches
Mail list logo