• 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: dictionary collision
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dictionary collision


  • Subject: Re: dictionary collision
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 01 Jun 2011 18:34:24 +0200

Le 1 juin 2011 à 17:23, David Jacopille a écrit :

>
> In the context of a tell "Adobe Illustrator CS5" command the following scripting addition function doesn't work:
>
> set r to round counter / 2
>
> It throws an error of type -30002 which I'm guessing means there is some collision with some Illustrator vocabulary (although round isn't in the Illustrator dictionary - rounded is though).  Whether I'm right about that or not, the function works outside of Illustrator but not inside.
>
> Unfortunately the command is buried deep inside the tell Illustrator statement and I don't want to back out for that.  It would be annoying to create a handler just for this problem.
>
> Is there a way to explicitly clarify what dictionary to use to interpret a function name like "round"?  Something like
>
> set r to (using scripting additions round (counter) / 2)

If there is no round function in the application, you aren't  facing a conflict.

I assume that tou are in fact facing what I described two or three times:
calling an OSAX function in a tell block issue an error.
Sometimes it's automatically filtered but sometimes it's not.
If I am right, you must replace :

set r to round counter / 2

by

set r to my round_it (counter/2)


on round_It(nbr)
return round nbr
end round_it

Yvan KOENIG (VALLAURIS, France) mercredi 1 juin 2011 18:32:47



 _______________________________________________
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: dictionary collision
      • From: David Jacopille <email@hidden>
References: 
 >dictionary collision (From: David Jacopille <email@hidden>)

  • Prev by Date: Re: dictionary collision
  • Next by Date: Re: dictionary collision
  • Previous by thread: Re: dictionary collision
  • Next by thread: Re: dictionary collision
  • Index(es):
    • Date
    • Thread