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/ >