3 Replies Latest reply on Jun 7, 2013 7:50 AM by Dave Merchant

    Array argument in function call from 3DAnnots to host

    mrfale67 Level 2


      with Acrobat I am trying this: host.my_func(Array) from within an Annots3D script.

      my_func is a pdf document function.

      This is what I get in my_func:


      1) console.println (Array): Arr_Element_1,Arr_Element2

      2) for..in, console.println (Array[i]):

      [object ScriptProxy]

      [object ScriptProxy]

      Array[i] is undefined


      (actually I am passing a 2-element array).


      So, the only way to work on Array in document my_func is to stringify Array (Array.toString()) and recreate an array. This may be a feasible way with litteral arrays but not as praticable with objects as you can image.

      Have you got any workarounds?