Getting GUI objects set up in AppleScript Studio
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.