• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to call AS method from Cocoa ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >How to call AS method from Cocoa ? (From: Kristofer Szymanski <email@hidden>)

  • Prev by Date: How to call AS method from Cocoa ?
  • Next by Date: Calling ObjC instance method from C
  • Previous by thread: How to call AS method from Cocoa ?
  • Next by thread: Calling ObjC instance method from C
  • Index(es):
    • Date
    • Thread