[futurebasic] Re: [FB] Status: FB's File I/O statement update ( i.e. conversion to 64-bit ) still in-progress

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2017 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Thu, 2 Mar 2017 09:47:56 -0500
Brian wrote:

> Ken's URL write up the FB Help's Appendix 'A' is a good overview.



Brian,

The example in the Appendix is dated. This should be stronger.

Ken


include "Tlbx LSOpen.incl"
include "Tlbx CFBundle.incl"

include resources "ReadMe.txt" // file to be copied to <app>/Contents/Resources

local mode
local fn OpenReadMe( name as CFStringRef )
'~'1
dim as CFBundleRef bundle
dim as CFURLRef    url

bundle = fn CFBundleGetMainBundle()
if ( bundle )
url = fn CFBundleCopyResourceURL( bundle, name, 0, 0 )
if ( url )
fn LSOpenCFURLRef( url, NULL )
CFRelease( url )
end if
end if
end fn

fn OpenReadMe( @"ReadMe.txt" )

RunApplicationEventLoop()