5 Replies Latest reply on Oct 18, 2008 5:33 AM by moniuch

    [JS][CS3] Method failing in palette


      Although I experience the problem in Illustrator CS/Win, I suspect someone might have been through a similar problem in InD, and it might expose some sort of bug. I seek to either have such a bug confirmed or grasp a solution. That's why I'm posting also on this forum.

      I wrote a method to check whether the active document's selection is exactly two vertical guides, and it works well when isolated, run from either Scripts menu or from ESTK. But once attached this method to a button in ScriptUI palette, it continuously fails to do its job. Again, it works OK from a modal dialog (which however is not a solution to me, since it does not allow interaction).

      It claims that "there is no document", although it is there and has the expected selection. I tried a whole bunch of try/catch, if'fing tests, referring to activeDocument as well as documents[x], passing a ready-to-use docref, repeating the #target directive, restarting Ai/ESTK, but it stubbornly claims there is no document.

      Anyone having a workaround? It's a showstopper :( I have to stick with palette type of window. :(