8 Replies Latest reply on Jan 10, 2009 3:18 PM by Steven..

    JS CS4 MISSING ENUM

    Steven.. Level 3
      is there a way to override or add to enum. for example vbs has 4 additional choices for idNumbering. can they be added manually
        • 1. Re: JS CS4 MISSING ENUM
          Level 1
          What are those four choices?

          As far as I know, the object model is functionally the same across the three scripting languages.

          Dave
          • 2. Re: JS CS4 MISSING ENUM
            Level 1
            If you use one of those four choices in a VBS script and then interrogate the text with a JS script, what does it give you?

            Dave
            • 3. Re: JS CS4 MISSING ENUM
              Steven.. Level 3
              idNumberingStyle.idArabicAbjad= 1296130410
              idNumberingStyle.idArabicAlifBaTah=1296130420
              idNumberingStyle.idHebrewBibical=1296589410
              idNumberingStyle.idHebrewNonStandard=1296589422

              this is the call
              app.activeDocument.chapterNumberPreferences.chapterNumberFormat=1296130410;
              In vbs passing the number value works but in js passing the number value return "expecting NumberingStyle but received 1296130410"

              when set with vbs then callin in js for example
              writeln(app.activeDocument.chapterNumberPreferences.chapterNumberFormat);
              returns a string value but not a NumberingStyle enumerator
              • 4. Re: JS CS4 MISSING ENUM
                Level 1
                Looks like a hole in the implementation of the unsupported RtoL features. There are others more knowledgeable than I on this issue, so perhaps one of them can cast more light.

                There is no documented, formal mechanism for a user to extend an enumeration.

                Dave
                • 5. Re: JS CS4 MISSING ENUM
                  Peter Kahrel Adobe Community Professional & MVP
                  Steven,

                  In JS you would use the following format:

                  ....pageNumberStyle = PageNumberStyle.arabicAbjad

                  The five availsble styles are

                  .arabic
                  .arabicAbjad
                  .arabicAlifBaTah
                  .hebrewBiblical
                  .hebrewNonStandard

                  Peter
                  • 6. Re: JS CS4 MISSING ENUM
                    Harbs. Level 6
                    Hi Steven,

                    I've got to be out of my mind for helping out with a competing product!
                    But, what the heck...

                    It's not exactly a hole. It's very much scriptable.

                    You can't add to the enums, but it does accept strings as well... That
                    should be enough info to point you in the right direction.

                    FWIW, I've found enums in CS4 to be rather buggy. I've found the need to
                    switch to the numerical forms on a number of occasions.

                    --
                    Harbs
                    http://www.in-tools.com
                    • 7. Re: JS CS4 MISSING ENUM
                      Harbs. Level 6
                      Peter Kahrel wrote:
                      > In JS you would use the following format:
                      >
                      > .....pageNumberStyle = PageNumberStyle.arabicAbjad
                      >


                      Hi Peter,

                      He's talking about the chapter numbering formats. That's a bit trickier.

                      It's interesting that vbs has the enums though... Who wants to file the bug?

                      --
                      Harbs
                      http://www.in-tools.com
                      • 8. Re: JS CS4 MISSING ENUM
                        Steven.. Level 3
                        Thanks for all the help esp Harbs. I am currently using string values, but I was trying to change it all to enums. Thanks again