• 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
Getting GUI objects set up in AppleScript Studio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting GUI objects set up in AppleScript Studio


  • Subject: Getting GUI objects set up in AppleScript Studio
  • From: Jeffrey Mattox <email@hidden>
  • Date: Fri, 28 Mar 2003 22:46:38 -0600

I use AppleScript Studio to construct my GUI and access controls using syntax like this:

set (contents of text field "month" of window "main") to "January"

If I need to access my controls in Cocoa, I pass my control objects to Cocoa using an AS "call method ... with parameters" command, but that gets unwieldy with a complicated GUI.

I'd like to do that AS line more directly in Cocoa, but I'm missing a piece of the puzzle:

NSWindow *myMainWindow = [NSApp mainWindow]; // window "main"

NSTextField *myMonthTextField = ?? // need help getting "month" field

[myMonthTextField setStringValue:@"January"];

Is there a way to ferret out the "month" text field object by name?

Things can get complicated if, for example, the text field in a tab view, so any pointers about generalizing this would be appreciated.

Jeff
_______________________________________________
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.

  • Prev by Date: Re: Is there a ready chart plotting view?
  • Next by Date: Re: Is there a ready chart plotting view?
  • Previous by thread: Re: anObject? editing cell in NSTableView
  • Next by thread: Re: Is there a ready chart plotting view?
  • Index(es):
    • Date
    • Thread