• 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
How to call AS method from Cocoa ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: How to call AS method from Cocoa ?
      • From: Jeffrey Mattox <email@hidden>
  • Prev by Date: RE: mutating method sent to immutable object
  • Next by Date: Re: How to call AS method from Cocoa ?
  • Previous by thread: Re: mutating method sent to immutable object
  • Next by thread: Re: How to call AS method from Cocoa ?
  • Index(es):
    • Date
    • Thread