Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Set variable to output of text field- xcode 4.5, applescript
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Mark FX" data-source="post: 1492874" data-attributes="member: 211556"><p>OK!</p><p></p><p>that means your working with the ApplescriptObjC language.</p><p></p><p>When you created the new project, at the top of the AppDelegate script file, you should have had this.</p><p></p><p>[CODE]</p><p>property parent : class "NSObject"</p><p>[/CODE]</p><p></p><p>what you want is this.</p><p></p><p>[CODE]</p><p>property parent : class "NSObject"</p><p>property myTextField : missing value</p><p>[/CODE]</p><p></p><p>then save the AppDelegate file, Then click the mainMenu.xib file, which will show you a main window, to the left of the window editor screen and the project navigation list there should be a blue cube called AppDelegate, right click this cube and you should see a connection menu, find the myTextField property item, add drag from this menu item to your textField, that will make a connection between the textfield and the property, this will enable you to read and write to the properties of the textField, and also call its class methods.</p><p></p><p>Then you can use the above stringValue() class method to retreive the text in the textField.</p><p></p><p>Hope this is clearer.</p><p></p><p>Regards Mark</p></blockquote><p></p>
[QUOTE="Mark FX, post: 1492874, member: 211556"] OK! that means your working with the ApplescriptObjC language. When you created the new project, at the top of the AppDelegate script file, you should have had this. [CODE] property parent : class "NSObject" [/CODE] what you want is this. [CODE] property parent : class "NSObject" property myTextField : missing value [/CODE] then save the AppDelegate file, Then click the mainMenu.xib file, which will show you a main window, to the left of the window editor screen and the project navigation list there should be a blue cube called AppDelegate, right click this cube and you should see a connection menu, find the myTextField property item, add drag from this menu item to your textField, that will make a connection between the textfield and the property, this will enable you to read and write to the properties of the textField, and also call its class methods. Then you can use the above stringValue() class method to retreive the text in the textField. Hope this is clearer. Regards Mark [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Set variable to output of text field- xcode 4.5, applescript
Top