• 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: A Subtle Error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Subtle Error


  • Subject: Re: A Subtle Error
  • From: "Nigel Garvey" <email@hidden>
  • Date: Sun, 16 Jan 2011 15:44:07 +0000

Luther Fuller wrote on Sun, 16 Jan 2011 09:23:15 -0600:

>on scanApplications(folderRef, indent, leaders, fileRefNr, folderPath)
>	tell application "Finder"
>		--
>		-- get a list of applications in applList
>		--
>		if (count items of applList) > 0 then
>			write folderPath to fileRefNr -- <<<<<<<<<<<<<<<<<<<

[snip]
 When I ran the script, I was surprised to
>always get an error at ...
>
>			write folderPath to fileRefNr -- <<<<<<<<<<<<<<<<<<<
>
>I wasted a couple of hours trying to understand and fix the problem.
>Finally, I read the handler code carefully, again, and fixed the problem
>with ...
>
>			tell me to write folderPath to fileRefNr -- <<<<<<<<<<<<<<<<<<<

Your original code tells the Finder to write to fileRefNr. If you didn't
open the access within a Finder tell statement too, the reference number
will have been assigned to the application running the script rather
than to the Finder. Only the application which opened the access can use it.

NG

 _______________________________________________
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

  • Prev by Date: A Subtle Error
  • Next by Date: Re: A Subtle Error
  • Previous by thread: Re: A Subtle Error
  • Next by thread: Setting bounds in Terminal
  • Index(es):
    • Date
    • Thread