[futurebasic] Re: [FB] CFStrings and Paths

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2011 : Group Archive : Group : All Groups

From: Deep <Info@...>
Date: Tue, 28 Jun 2011 22:58:24 +0100
Thanks!


> From: Brian S <fblistserve@...>
> Reply-To: <futurebasic@...>
> Date: Tue, 28 Jun 2011 12:31:02 -0700
> To: <futurebasic@...>
> Subject: Re: [FB] CFStrings and Paths
> 
> 
> On Jun 28, 2011, at 9:46 AM, Ken Shmidheiser wrote:
> 
>> Long answer:
> 
> 
> A Q&D version( and mostly both, so check it ):
> 
> beginCDeclaration
> CFStringRef GetIt( CFStringRef s );
> endC
> 
> beginCFunction
> CFStringRef GetIt( CFStringRef s )
> { 
>   NSString *outString = [(NSString *)s stringByExpandingTildeInPath];
>   return ( (CFStringRef *)outString );
> }  
> endC
> 
> toolbox fn GetIt( CFStringRef s ) = CFStringRef
> 
> dim as CFStringRef result
> dim as Boolean    ignore
> dim as Str255     pString
> 
> result = fn GetIt( @"~/Desktop")
> ignore = fn CFStringGetPascalString( result, @pString, 256,
> _kCFStringEncodingMacRoman )
> CFRelease( result )
> print pString
> 
> RunApplicationEventLoop()
> 
> 
> 
> Brian S
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
> To access the list archives, go to:  http://freegroups.net/groups/futurebasic/
>