On 3/15/08 3:04 PM, Kevin Dixon said:
>I'm trying to write a method that will convert a NSString containing a
>file system URL to an FSRef
>
> *SNIP*
>
>Also, is there a better way to accomplish this?
Yes, use the NDAlias classes which provide all sort of useful code to
convert to and from: url,
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 {
>
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 accompl
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 lo
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 were
On 15 Mar '08, at 11:49 PM, Stuart Malin wrote:
1: I have never worked with CF functions before
Then, with all due respect, you might want to hold off giving advice
to others until you get some more experience with it. CF can be tricky
to work with.
(1) Both of your examples leak memory
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 b
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 Co
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:
http://www.cocoadev.com/index
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 manipulati
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 creat
-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)
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 = CFStringCreateWithCString
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 = CFStringCreateWithCS
14 matches
Mail list logo