From 4aa6da8ed37055e196204a45e3bac32039b395d9 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Tue, 17 Jun 2008 17:17:32 +0200 Subject: Build the system as a framework, include the StepTalk Shell for quick testing. --- StepTalkShell/AppKit.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 StepTalkShell/AppKit.txt (limited to 'StepTalkShell/AppKit.txt') diff --git a/StepTalkShell/AppKit.txt b/StepTalkShell/AppKit.txt new file mode 100644 index 0000000..ea79ab9 --- /dev/null +++ b/StepTalkShell/AppKit.txt @@ -0,0 +1,40 @@ +Simple AppKit Examples +---------------------- +To be able to try following examples you have to load the AppKit module: + + > Environment loadModule: 'AppKit' + + +How to get a filename using the Open panel + + > NSOpenPanel openPanel runModal ; filename + +Applications and files +---------------------- + +> Workspace := NSWorkspace sharedWorkspace + +How to launch an application + + > Workspace launchApplication:'application name' + +How to open a file + + > Workspace openFile:'file name' + +How to open a file with specified application + + > Workspace openFile:'file name' withApplication:'application name' + +How to open a file using the open panel + + > Workspace openFile:(NSOpenPanel openPanel runModal ; filename) + +Text +---- + +How to display a RTF file + + > text := NSAttributedString alloc + > text initWithPath: file documentAttributes:nil + > Transcript show: (text string) -- cgit v1.2.3