Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,29 @@
_window = 1
begin enum 1
_scrollView
_textView
end enum
void local fn BuildWindow
CGRect r = {0,0,550,400}
window _window, @"Read Entire File", r
scrollview _scrollView, r
ViewSetAutoresizingMask( _scrollView, NSViewWidthSizable + NSViewHeightSizable )
textview _textView,, _scrollView
end fn
local fn ReadTextFile
CFStringRef string
CFURLRef url = openpanel 1, @"Select text file..."
if ( url )
string = fn StringWithContentsOfURL( url, NSUTF8StringEncoding, NULL )
TextSetString( _textView, string )
else
// user cancelled
end if
end fn
fn BuildWindow
fn ReadTextFile
HandleEvents