• 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: display dialog bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display dialog bug


  • Subject: Re: display dialog bug
  • From: Jeff Porten <email@hidden>
  • Date: Mon, 15 Aug 2005 17:22:53 -0400

Coming very late to this party, which Paul B. started in June discussing a bug in handling Unicode text when expecting strings.

Paul wrote:


Much worse, in the main
script, any construction such as

    if a = "Last" then
        -- do this
    else
        -- do that
    end if

would always 'do that' when a simply "looked like" Last but actually had
invisible ASCII 0 characters littered throughout it.



For those of us whose heads hurt when thinking about invisible characters and forced coercion of variables that look perfectly good in their uncoerced state, I'm inclined to think that the easier habit to adopt would be:


if test1 then ...
else if test2 then ...
-- repeat until possible options exhaustively tested
else
-- throw error and die gracefully
end if

Obviously this only works in things like button returns when the universe of possibilities is small and easy to enumerate. But I'd rather have a thrown error than a deleted Address Book. Thoughts?

Best,
Jeff

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Simple InDesign Script
  • Next by Date: [OT] Smile List...?
  • Previous by thread: Re: GUI Scripting - Print/Save PDF As Postscript
  • Next by thread: [OT] Smile List...?
  • Index(es):
    • Date
    • Thread