Scripting documentation cleanup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@16242 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Stefan Urbanek 2003-03-24 09:07:47 +00:00
parent 18854c5987
commit 70ab16972f
11 changed files with 144 additions and 147 deletions

View file

@ -1,3 +1,9 @@
2003 Mar 24
* GNUmakefile*: Removed unnecessary stuff
* Documentation: Moved relevant docs into StepTalk documentation. Removed
the directory.
2003 Mar 23
* Added ScriptingMenu.gorm

View file

@ -1,48 +0,0 @@
Application Scripting
---------------------
Creating a scriptable application
---------------------------------
1 Think of objects you want to provide for scripting.
2 Make classes available in ScriptingInfo.plist:
{
STClasses =
{
MessageComposition,
InternetAddress
};
}
Add this line to your makefile:
MyApp_RESOURCE_FILES = ScriptingInfo.plist
3 Include bundle loading code
Copy files from Support directory called
STScriptingSupport.h
STScriptingSupport.m
to your project and add following line to your makefile:
MyApp_OBJC_FILES += STScriptingSupport.m
4 Make scripting available to the user
#import "STScriptingSupport.h"
...
if([NSApp isScriptingSupported])
{
[menu addItemWithTitle: @"Scripting"
action: NULL
keyEquivalent: @""];
[menu setSubmenu: [NSApp scriptingMenu]
forItem: [menu itemWithTitle:@"Scripting"]];
}
...

View file

@ -1,6 +0,0 @@
Installing AppTalk
------------------
Type:
> make
> make install

View file

@ -1,57 +0,0 @@
Scripts
-------
Application is looking for scripts in:
- applications resource directory
ApplicationName.app/Resources/Scripts
- application specific scripts in all GNUstep Library directories
*/Library/StepTalk/Scripts/ApplicationName
- shared scriptins in all GNUstep Library directories
*/Library/StepTalk/Scripts/Shared
- resource directories of all bundles loaded by the application
BundleName.bundle/Resources/Scripts
(*) can be any of GNUstep System, Local, Network or user path
The .stinfo file
----------------
Each script may have accopmpaining file containing information about script.
This information file is optional, has extension .stinfo and its name is script
name with that extension. For example if script name is insertDate.st then
information file is insertDate.st.stinfo. File may contain:
- script name that will be shown to the user (localizable)
- script description (localizable)
- scripting language used for script -- overrides language guess based on
file extension
The file is dictionary property list. Kes are:
Name - Name of a script that is shown to the user.
It can be localized.
Description - Description of a script. It can be localized.
Language - Scripting language name used in script. This value overrides
language guess based on script file extension.
Localizable keys have values that are dictionaries:
{
Default = {
Name = "Some name";
Description = "Some description";
};
English = {
Name = "Some name in english";
Description = "Some description in english";
};
French = {
Name = "Some name in french";
Description = "Some description in french";
}
}

View file

@ -27,13 +27,10 @@ GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles
include $(GNUSTEP_MAKEFILES)/common.make
include Version
PACKAGE_NAME = ApplicationTalk
PACKAGE_NAME = ApplicationScripting
SUBPROJECTS = \
Source \
# Apps \
# Tools
Source
-include GNUMakefile.preamble
include $(GNUSTEP_MAKEFILES)/aggregate.make

View file

@ -28,8 +28,7 @@
#
# Things to do before compiling
before-all::
ln -sf Source/Headers .
# before-all::
# Things to do after compiling
# after-all::

View file

@ -1,36 +1,42 @@
(unnamed bundle)
----------------
Ahthor: Stefan Urbanek <urbanek@host.fr>
Application Scripting bundle
----------------------------
Ahthor: Stefan Urbanek <urbanek@host.sk>
NOTE: this bundle wants another name and cleanup.
NOTE: this bundle wants name and cleanup.
What is Application Scripting Bundle ?
--------------------------------------
What is (unnamed) ?
------------------
Application scripting framework.
Bundle that allows users to 'script' applications. In other words, for example,
users can:
With AppTalk it is possible to make applications scriptable by StepTalk.
- extend the behaviour of application by adding their own functionality
- automate tasks in the application
- create a batch task
How to make applications scriptable is described in Documentation. It can be
done very easily in less than five minutes.
Where to get it?
----------------
AppTalk is part of the StepTalk and you can download StepTalk from
http://steptalk.host.sk
Application Scripting Bundle is part of the StepTalk and you can download
it from:
http://steptalk.host.sk/download.html
Installation
------------
To install AppTalk type:
Application Scripting Bundle is automatically installed with StepTalk. You can
install it separately by doing:
> make
> make install
Examples
--------
Ink.app example - Modified scriptable version of Ink.app.
Feedback
--------
Any bug reports and comments are welcome at
<urbanek@host.sk>
Any bug reports and comments are welcome at urbanek@host.sk

View file

@ -7,7 +7,7 @@
Copyright (c) 2002 Stefan Urbanek
Written by: Stefan Urbanek <stefanurbanek@yahoo.fr>
Written by: Stefan Urbanek <urbanek@host.sk>
Date: 2002 Apr 13
This file is part of the StepTalk project.

View file

@ -9,7 +9,7 @@
Copyright (c) 2002 Stefan Urbanek
Written by: Stefan Urbanek <stefanurbanek@yahoo.fr>
Written by: Stefan Urbanek <urbanek@host.sk>
Date: 2002 Apr 13
This file is part of the StepTalk project.

View file

@ -1,3 +1,7 @@
2003 Mar 24
* Documentation: Updated ApplicationScripting.txt
2003 Mar 23
* Added ApplicationScripting

View file

@ -1,19 +1,115 @@
Application Scripting
---------------------
NOTE: This is obsolete!
Scripting for applications is provided by the Application Scripting Bundle. The
bundle is installed together with StepTalk.
To make your applications scriptable, you have to make and install AppTalk
library.
Content:
Creating a scriptable application
Scripts
Script metafile
Creating a scriptable application
---------------------------------
1 Think of objects you want to provide for scripting.
2 Make classes available in ScriptingInfo.plist:
{
STClasses =
{
MessageComposition,
InternetAddress
};
}
Add this line to your makefile:
MyApp_RESOURCE_FILES = ScriptingInfo.plist
See documents in AppTalk/Documentation where you may find more information
about:
3 Include bundle loading code
Installing AppTalk
Creating a scriptable application in a few minutes
Scripts locations
Copy files:
STScriptingSupport.h
STScriptingSupport.m
from ApplicationScripting/Support directory to your project and add
following line to your makefile:
MyApp_OBJC_FILES += STScriptingSupport.m
You may find AppTalk sources at the same place as StepTalk
4 Make scripting available to the user
http://steptalk.host.sk
#import "STScriptingSupport.h"
...
if([NSApp isScriptingSupported])
{
[menu addItemWithTitle: @"Scripting"
action: NULL
keyEquivalent: @""];
[menu setSubmenu: [NSApp scriptingMenu]
forItem: [menu itemWithTitle:@"Scripting"]];
}
...
Scripts
-------
Application is looking for scripts in:
- applications resource directory
ApplicationName.app/Resources/Scripts
- application specific scripts in all GNUstep Library directories
*/Library/StepTalk/Scripts/ApplicationName
- shared scriptins in all GNUstep Library directories
*/Library/StepTalk/Scripts/Shared
- resource directories of all bundles loaded by the application
BundleName.bundle/Resources/Scripts
(*) can be any of GNUstep System, Local, Network or user path
Script metafile
---------------
Each script may have accopmpaining file containing information about script.
This information file is optional, has extension .stinfo and its name is script
name with that extension. For example if script name is insertDate.st then
information file is insertDate.st.stinfo. File may contain:
- script name that will be shown to the user (localizable)
- script description (localizable)
- scripting language used for script -- overrides language guess based on
file extension
The file is dictionary property list. Kes are:
Name - Name of a script that is shown to the user.
It can be localized.
Description - Description of a script. It can be localized.
Language - Scripting language name used in script. This value overrides
language guess based on script file extension.
Localizable keys have values that are dictionaries:
{
Default = {
Name = "Some name";
Description = "Some description";
};
English = {
Name = "Some name in english";
Description = "Some description in english";
};
French = {
Name = "Some name in french";
Description = "Some description in french";
}
}