How to call AS method from Cocoa ?
How to call AS method from Cocoa ?
- Subject: How to call AS method from Cocoa ?
- From: Kristofer Szymanski <email@hidden>
- Date: Fri, 2 May 2003 21:54:05 +0200
I wonder if it's possible to call method in a AS script from Cocoa ?
I have AS application and now added a toolbar and resizing windows
(like in System Preferences)
When I click on the Preferences button in the toolbar this is executed :
- (IBAction)openPrefs:(id)sender
{
[mainWindow setTitle: @"Preferences"];
[mainWindow setContentView:Box1];
}
( window title is set to "Preferences" and a new Box1 view appears)
The problem is that after executing [mainWindow setContentView:Box1];
I can no longer use AppleScript to control (for example) buttons in
in this new Box1 view.
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]
}
/ Kristofer
_______________________________________________
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.