21 lines
347 B
Plaintext
21 lines
347 B
Plaintext
include "NSLog.incl"
|
|
|
|
local fn ReadTextFile
|
|
CFURLRef url
|
|
CFStringRef string
|
|
|
|
url = openpanel 1, @"Select text file..."
|
|
if ( url )
|
|
string = fn StringWithContentsOfURL( url, NSUTF8StringEncoding, NULL )
|
|
if ( string )
|
|
NSLog(@"%@",string)
|
|
end if
|
|
else
|
|
// user cancelled
|
|
end if
|
|
end fn
|
|
|
|
fn ReadTextFile
|
|
|
|
HandleEvents
|