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="dhmmjoph" data-source="post: 1492891" data-attributes="member: 276211"><p>I started a new project and used the same code. I then added to it:</p><p>[code]</p><p>on test_(sender)</p><p> log sender's stringValue()</p><p> set theText to sender's stringValue()</p><p> log theText</p><p> end test</p><p>[/code]</p><p>the text I entered showed up twice in the log, indicating that the variable is being written. </p><p></p><p>However, if I try to display the variable in a dialog:</p><p> [code]</p><p>on test_(sender)</p><p> log sender's stringValue()</p><p> set theText to sender's stringValue()</p><p> display dialog (theText)</p><p> end test</p><p>[/code]</p><p>then an error shows up in the log:</p></blockquote><p></p>
[QUOTE="dhmmjoph, post: 1492891, member: 276211"] I started a new project and used the same code. I then added to it: [code] on test_(sender) log sender's stringValue() set theText to sender's stringValue() log theText end test [/code] the text I entered showed up twice in the log, indicating that the variable is being written. However, if I try to display the variable in a dialog: [code] on test_(sender) log sender's stringValue() set theText to sender's stringValue() display dialog (theText) end test [/code] then an error shows up in the log: [/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