mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-22 02:51:05 +00:00
Documentation changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@16240 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b5c226f9e8
commit
b05e152637
2 changed files with 13 additions and 58 deletions
|
@ -23,8 +23,10 @@ Creating a scriptable application
|
||||||
|
|
||||||
3 Include bundle loading code
|
3 Include bundle loading code
|
||||||
|
|
||||||
Copy file from Support directory called ScriptingSupport.m to your project
|
Copy files from Support directory called
|
||||||
and add this line to your make file:
|
STScriptingSupport.h
|
||||||
|
STScriptingSupport.m
|
||||||
|
to your project and add following line to your makefile:
|
||||||
|
|
||||||
MyApp_OBJC_FILES += STScriptingSupport.m
|
MyApp_OBJC_FILES += STScriptingSupport.m
|
||||||
|
|
||||||
|
@ -34,34 +36,13 @@ Creating a scriptable application
|
||||||
|
|
||||||
|
|
||||||
...
|
...
|
||||||
if([NSApp isScriptingSupported])
|
if([NSApp isScriptingSupported])
|
||||||
{
|
{
|
||||||
[menu addItemWithTitle:_(@"Scripting")
|
[menu addItemWithTitle: @"Scripting"
|
||||||
action: action
|
action: action
|
||||||
keyEquivalent: @""];
|
keyEquivalent: @""];
|
||||||
}
|
|
||||||
|
|
||||||
You may do it manually by adding following menu item into your menu:
|
[menu setSubmenu: [NSApp scriptingMenu]
|
||||||
|
forItem: [menu itemWithTitle:@"Scripting"]];
|
||||||
if([NSApp isScriptingSupported])
|
}
|
||||||
{
|
...
|
||||||
NSMenu *scriptingMenu;
|
|
||||||
NSLog(@"Scripting is supported");
|
|
||||||
scriptingMenu = [[NSMenu alloc] init];
|
|
||||||
[menu setSubmenu: scriptingMenu
|
|
||||||
forItem: [menu itemWithTitle:_(@"Scripting")]];
|
|
||||||
[scriptingMenu addItemWithTitle: _(@"Scripts panel...")
|
|
||||||
action: @selector(orderFrontScriptsPanel:)
|
|
||||||
keyEquivalent: @""];
|
|
||||||
[scriptingMenu addItemWithTitle: _(@"Show transcript")
|
|
||||||
action: @selector(orderFrontTranscriptWindow:)
|
|
||||||
keyEquivalent: @""];
|
|
||||||
RELEASE(scriptingMenu);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NSLog(@"Scripting is NOT supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
Or you may use Gorm to add menu item into applications menu and make
|
|
||||||
necessary connections.
|
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
Gorm Integration
|
|
||||||
----------------
|
|
||||||
|
|
||||||
To make scripting available to the user using gorm, one has to create and
|
|
||||||
connect menu items activating scripting.
|
|
||||||
|
|
||||||
Edit file ClassInformation.plist in Gorm resources by updating FirstResponder
|
|
||||||
information:
|
|
||||||
|
|
||||||
{
|
|
||||||
FirstResponder = {
|
|
||||||
Actions = (
|
|
||||||
/* ... */
|
|
||||||
orderFrontScriptsPanel:,
|
|
||||||
orderFrontTranscriptWindow:,
|
|
||||||
/* ... */
|
|
||||||
);
|
|
||||||
|
|
||||||
/* ... */
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
The file is located in $GNUSTEP_SYSTEM_ROOT/Applications/Gorm.app/Resources
|
|
||||||
|
|
||||||
Note: This is not very nice solution, I know.
|
|
Loading…
Reference in a new issue