3 Replies Latest reply on May 11, 2009 6:17 AM by Harbs.

    VariableType narrow

    jsantaelena

      Hi people.

       

      I'm using java corba to integrate my app with InDesing Server. I'm facing some troubles trying to know what type a have to narrow a object. Some methods returnd VartiableType and sometimes its return is a Rectangle and other a Story. I have to use the specific Helper to narrow these objects but VariableType doens't exposes a method to find what type they are. There is a way to know about a VariableType content?

       

      Thanks.

        • 1. Re: VariableType narrow
          Kasyan Servetsky Level 5

          I know nothing about java corba – officially three languages are supported in ID scripting: AppleScript, JavaScript, VBScript. Here is how to determine the type of a variable (citation from InDesignCS3 Scripting Tutorial):

           

          AppleScript:
          -- Given a variable of unknown type, "myMysteryVariable"...
          set myType to class of myMysteryVariable
          --myType will be an AppleScript type (e.g., rectangle)


          JavaScript:
          //Given a variable of unknown type, "myMysteryVariable"...
          myType = myMysteryVariable.constructor.name;
          //myType will be a string corresponding to the JavaScript type (e.g., "Rectangle")


          VBScript:
          Rem Given a variable of unknown type, "myMysteryVariable"...
          myType = TypeName(myMysteryVariable)
          Rem myType will be a string corresponding to the variable type (e.g., "Rectangle")

           

          This is not exactly what you need, but may be it will help you somehow.

          1 person found this helpful
          • 2. Re: VariableType narrow
            jsantaelena Level 1

            Thank you Kasyan, but I didn't find a corba equivalent yet. Do you know what forum can I ask to java corba developers?

             

            Best regards.

            • 3. Re: VariableType narrow
              Harbs. Level 6

              Do you know what forum can I ask to java corba developers?

               

              My guess would be the InDesign Server forum, but I saw that you 

              already posted there. There's not a lot of folks who use Corba / 

              InDesign Sever. At least those of us who hang out on these fora...

               

              Harbs