• 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: Checking on the existence of a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking on the existence of a file


  • Subject: Re: Checking on the existence of a file
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 04 Dec 2012 09:16:12 +1100

On 04/12/2012, at 7:32 AM, Harald E Brandt <email@hidden> wrote:

> Although explicit coercion to boolean is safest, I am curious to learn the rules, and why e.g NSFileManager does not need coercion.

I wish I could fathom them -- I tend to include the coercion regardless. Both fileExistsAtPath: and something like hasPrefix: are listed as returning BOOL, and both appear in the .bridgesupport files as "<retval type='B'/>", yet one returns a boolean and the other an integer. Mysterious.

And if you call one AS class from another, you get NSNumbers rather than boolean/integer/real. I presume that's due to the lack of any signature, but again I'm just guessing.

--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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: Checking on the existence of a file
      • From: Harald E Brandt <email@hidden>
References: 
 >Re: Checking on the existence of a file (From: Harald E Brandt <email@hidden>)
 >Re: Checking on the existence of a file (From: Shane Stanley <email@hidden>)
 >Re: Checking on the existence of a file (From: Shane Stanley <email@hidden>)
 >Re: Checking on the existence of a file (From: Harald E Brandt <email@hidden>)

  • Prev by Date: Re: Checking on the existence of a file
  • Next by Date: Nearly complete
  • Previous by thread: Re: Checking on the existence of a file
  • Next by thread: Re: Checking on the existence of a file
  • Index(es):
    • Date
    • Thread