• 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: Why these errors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why these errors?


  • Subject: Re: Why these errors?
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 11 Feb 2014 03:40:37 -0600

On Feb 10, 2014, at 22:04, Shane Stanley <email@hidden> wrote:
So you're saying the result will be {folder, class}, and definitely not {folder, folder}? Let's see if anyone following along has run the script and can post a definitive answer...
______________________________________________________________________

Hey Shane,

Yeah, that's a nice little gotcha that happens here and there.

tell application id "com.apple.finder" -- Finder.app
set x to selection
set y to item 1 of x
set a to class of y
tell y
set b to its class
end tell
return {a, b}
end tell

Adding its to the mix fixes the problem of course, but it can be a hell of a difficult thing to find in your code.

One of the many reasons I keep upgrading Script Debugger year after year is the ability to step though code and watch the results.

--
Take Care,
Chris

 _______________________________________________
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: Why these errors?
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Why these errors? (From: has <email@hidden>)
 >Re: Why these errors? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Why these errors?
  • Next by Date: Re: Why these errors?
  • Previous by thread: Re: Why these errors?
  • Next by thread: Re: Why these errors?
  • Index(es):
    • Date
    • Thread