• 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
Another Newbie on XCOdde - applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Another Newbie on XCOdde - applescript
      • From: Philip Aker <email@hidden>
  • Prev by Date: Re: Scripting Apple Mail to "Go On/Offline
  • Next by Date: Re: Show/Hide extension
  • Previous by thread: Re: Scripting Apple Mail to "Go On/Offline
  • Next by thread: Re: Another Newbie on XCOdde - applescript
  • Index(es):
    • Date
    • Thread