Another Newbie on XCOdde - applescript
Another Newbie on XCOdde - applescript
- Subject: Another Newbie on XCOdde - applescript
- From: Conrad Nolte <email@hidden>
- Date: Wed, 14 May 2008 07:42:03 -0700 (PDT)
Hi,
I am learning apple scripting specific to XCode and am not sure, if this question would be better placed in the XCode user list. Please excuse, in case this questions does not belong here:
I try to understand how to use handlers in XCode. In the "Mail Search Tutorial" event handlers are explained. My question is:
How can I use those good old handlers of apple script in XCode applications based on apple
script?
How, for example, should the following script be written, if I wanted to have a simple handler [ Handler() ] calling up a dialog in the "Currency Converter" sample application that comes with XCode?
The apple script component
of the XCode applictaion looks like this (my question is marked by: [ (* ==== ]:
on clicked theObject
tell window of theObject
try
set theRate to contents of text field "rate"
set theAmount to
contents of text field "amount" as number
set contents of text field "total" to theRate * theAmount
on error
set contents of text field "total" to 0
end try
end tell
(* ==== How do I call a handler In Xcode?? ==== *)
Handler()
(* ==== How do I call a handler In Xcode?? ==== *)
end
clicked
on should quit after last window closed theObject
return true
end should quit after last window closed
(* ==== How would I have to write a handler in Xcode?? ==== *)
on Handler()
display dialog "The Handler has been executed"
end Handler
Thanks a lot for Your attention.
Conrad
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden