Re: How to call AS method from Cocoa ?
Re: How to call AS method from Cocoa ?
- Subject: Re: How to call AS method from Cocoa ?
- From: Jeffrey Mattox <email@hidden>
- Date: Fri, 2 May 2003 15:50:01 -0500
I posted details on how to do this, based on work by others. Look
for the thread "Adding AppleScript Studio Support" to a Cocoa Appl in
the cocoa-dev archives:
http://lists.apple.com/archives/cocoa-dev/2003/Mar/02/addingapplescriptstudios.002.txt
Note: you cannot access global variables from the script called this
way as it invoked in its own environment. But, you can pass anything
the script might need as an argument, of figure it out from scratch
in the script (e.g., window "main"). Also, your handler name must be
all lower case.
We need an FAQ.
Jeff
At 9:54 PM +0200 5/2/03, Kristofer Szymanski wrote:
I wonder if it's possible to call method in a AS script from Cocoa ?
...
So I would like to create a method in AS script, smoething like :
on showBox1()
set visible of "Box1" of window "main" to true
end showBox1
and call it from here :
- (IBAction)openPrefs:(id)sender
{
[mainWindow setTitle: @"Preferences"];
[showBox1]
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.