• 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
Re: booleans...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: booleans...


  • Subject: Re: booleans...
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Tue, 20 Mar 2018 13:43:29 +0900


> On Mar 20, 2018, at 13:36, Stan Cleveland <email@hidden> wrote:
>
> On Mar 19, 2018, at 09:29 PM, Jean-Christophe
>>  <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>> Obviously this:
>>
>> on myBoolean(myExpression)
>>      try
>>              myExpression
>>              return true as boolean
>>      on error
>>              return false as boolean
>>      end try
>> end myBoolean
>>
>> doesn't work, since the error is caught before sending myExpression to
>> myBoolean and I still end up with an error instead of FALSE...
>
> But this does work:
>
> on myBoolean(myExpression)
>       try
>               myExpression
>               set succeeded to true
>       on error
>               set succeeded to false
>       end try
>       return succeeded
> end myBoolean
>
> Stan C.

myBoolean(alias (((path to desktop) & "not.there") as text))

just gives me an error.


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


 _______________________________________________
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: booleans...
      • From: Stan Cleveland <email@hidden>
    • Re: booleans...
      • From: Shane Stanley <email@hidden>
References: 
 >Re: booleans... (From: Stan Cleveland <email@hidden>)

  • Prev by Date: Re: booleans...
  • Next by Date: Re: booleans...
  • Previous by thread: Re: booleans...
  • Next by thread: Re: booleans...
  • Index(es):
    • Date
    • Thread