• 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: Weird Finder bug - or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird Finder bug - or not?


  • Subject: Re: Weird Finder bug - or not?
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 18 Aug 2003 22:21:23 -0700

My user confirms the workaround I guessed at: rebooting his computer "fixed"
the scripts for him. But I have no idea what condition messes up the
Finder's ability to understand 'file' whereas it has no problem after
rebooting. (I'll try a simple log out and in the next time this happens.)

Anyone else?

--
Paul Berkowitz



> From: Paul Berkowitz <email@hidden>
> Date: Mon, 18 Aug 2003 18:45:36 -0700
> To: AppleScript-Users <email@hidden>
> Subject: Weird Finder bug - or not?
>
> I seem to have found a "floating" bug in Finder scripting in OS 10.2.6. Now
> you see it, now you don't.
>
> A user of one of my scripts that has been available for a very long time
> wrote me that the script was erroring immediately with a "Finder got an
> error: descriptor mismatch".
>
> I tried it myself in OS 10.2.6, and sure enough replicated the same error.
> It boiled down to these lines:
>
> on open (theSelection)
>
> set fp to item 1 of theSelection as string
>
> tell application "Finder" to set fileName to file fp's name
>
> end open
>
> 'file fp' in the second line was highlighted.
>
> If I changed the first line to 'as Unicode text' instead of 'as string' all
> was well. But this script has to work in OS 10.1 as well as 10.2, and alias
> 'as Unicode text' wasn't introduced until OS 10.1.5 or thereabouts. (AS
> 1.8.3 I think.)
>
> Changing the second line to 'alias fp' instead of 'file fp' with 'as string'
> in the first line also worked, I think. (I know I could just parse the
> filepath to get the file name, but later in the script I really do need the
> Finder to set file type, creator type and to rename the file.)
> I wanted to double-check 'alias' today
>
> But here's the weird part: today I get no error with the original script!
> Both 'as string' and 'file fp' work just fine together.
>
> So now I can't test it and I can't figure out what's going on. All I did
> between yesterday and today was to restart my computer. How could that
> matter? Has anyone else seen anything like this in OS 10.2.6?
>
> --
> Paul Berkowitz
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Weird Finder bug - or not? (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: appletalk and tcpip
  • Next by Date: Re: Strip characters without recursive loop
  • Previous by thread: Weird Finder bug - or not?
  • Next by thread: Re: Weird Finder bug - or not?
  • Index(es):
    • Date
    • Thread