• 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
Second Call to Non-Stay-Open Script App Fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Second Call to Non-Stay-Open Script App Fails


  • Subject: Second Call to Non-Stay-Open Script App Fails
  • From: "S. J. Cunningham" <email@hidden>
  • Date: Wed, 04 Jun 2014 04:12:05 -0400

Applescript Dudes:

Can someone explain to me why the second call to this non-stay-open script app fails:

================
property dsa : application "Data Storage App"
launch dsa
set currentValue to dsa's getTestProperty()
display dialog "Current value is: " & currentValue

set currentValue to dsa's getTestProperty() -- second call fails if app isn't stay-open
display dialog "Current value is: " & currentValue
===================

The "Data Storage App" is

===================
property testProperty : "initial Value"

on getTestProperty()
	return testProperty
end getTestProperty

on setTestProperty(newValue)
	set testProperty to newValue
	return
end setTestProperty
====================

I thought the whole point of "launch" was to open an app without calling it's run handler.  I know I can make this work by making the app stay-open but I don't understand why I have to.  Note that adding a second "launch" before the second call meets with the same failure.

Thanks.

Steve
 _______________________________________________
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: Second Call to Non-Stay-Open Script App Fails
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Swift & AppleScript
  • Next by Date: Re: Second Call to Non-Stay-Open Script App Fails
  • Previous by thread: [ANN] ASObjC Explorer Update
  • Next by thread: Re: Second Call to Non-Stay-Open Script App Fails
  • Index(es):
    • Date
    • Thread