• 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
Puzzling Error Again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Puzzling Error Again


  • Subject: Puzzling Error Again
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 4 May 2007 14:49:12 -0500

On 18 Feb, I asked about the error message "The cancel button cannot be the same as the default button.". This error has been elusive, but today it happened due to an odd e-mail message I received. And was easily reproducable.

Taking advantage of this situation, I did some bug searching and found the line of code that causes the error.

	ignoring case
		repeat with i from 1 to wordCount -- strip badwords
			set newWord to (item i of wordList)
			newWord is not in badWords -----------------!
			if the result then
				set newWordList to newWordList & {newWord}
			end if
		end repeat
	end ignoring

The error is caused by the line marked with "!". Putting this single line in a try block will fix the problem.

It is true that a 'choose folder' dialog appears way before the problem line, but I have also seen the "cancel button" error when there is no 'choose folder' dialog.

What may be important here is the message in Mail that I'm using to test with. The variable 'wordList' in the snippet, above, is the subject line of the message and 'badWords' is the list {"", "-", "reply", "re", "Fwd", "Fw"}. But this particular message (and the body of the message) consists mostly of the "BLACK DIAMOND ?" character (probably spam). I have tried finding this character with Character Palette, but no luck. Rather than using a try block, I should perhaps test the subject string from which I obtained 'wordList'.

Does anyone have any idea what the "BLACK DIAMOND ?" character is?

And does anyone have any idea what the connection is between the error message and the line of code that produces it? It makes no sense to me!

_______________________________________________
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: Puzzling Error Again
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: How to compare contents of a folder against a list?
  • Next by Date: Re: Puzzling Error Again
  • Previous by thread: Andrew Donnelly/QNM Markham/QW1/CA is out of the office.
  • Next by thread: Re: Puzzling Error Again
  • Index(es):
    • Date
    • Thread