• 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: JSA -- now I believe this is a bug (JSA or AS)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JSA -- now I believe this is a bug (JSA or AS)


  • Subject: Re: JSA -- now I believe this is a bug (JSA or AS)
  • From: has <email@hidden>
  • Date: Thu, 18 Dec 2014 16:06:43 +0000

Deivy Petrescu wrote:

> set k to run script "Math.tan((Math.PI)/3)" in “_javascript_”
> Result: 1
>
> the problem happens with all trig functions.

It has nothing to do with JS Math functions:

    run script "1.6" in "_javascript_"
    --> 1

JXA's OSACoerceToDesc handler is broken. SE asks JXA to convert the script's result value to an AEDesc of typeWildCard - i.e. whatever type JXA thinks most appropriate - and JXA returns an AEDesc of typeInteger. For a floating point number. With a non-zero fraction. In a language that doesn't even _have_ integers.

Can't imagine why I keep saying JXA is a broken POS...

has
 _______________________________________________
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: JSA -- now I believe this is a bug (JSA or AS)
      • From: Deivy Petrescu <email@hidden>
  • Prev by Date: Rép: odd Numbers's behaviour
  • Next by Date: Re: odd Numbers's behaviour
  • Previous by thread: Re: JSA -- now I believe this is a bug (JSA or AS)
  • Next by thread: Re: JSA -- now I believe this is a bug (JSA or AS)
  • Index(es):
    • Date
    • Thread