selectAll error in MTextComponent

Help
2008-10-29
2012-12-04
  • Hi,

    I'm trying to script a JTextPane with an HTMLEditor kit and getting an error from MTextComponent.selectAll() I suspect here:
    if(getTextComponent().getSelectionStart() != 0 || getTextComponent().getSelectionEnd() != length)
            {
                throw new Error("clicking and then hitting " + OSUtils.InputEventGetModifiersExText(OSUtils.MENU_MASK) + "+A " + " should select everything");
            } else
            {
                return;
            }

    Because with an HTMLEditorKit in place, getTextComponent().getSelection<Start|End> isn't returning the position that marathon would ordinarily expect. 

    How can I work around this?  Can I use a scriptable method that doesn't invoke selectAll()?

    Thanks.

     
    • This forum will not be used for support requests and will be deleted soon. A google group for Marathon related discussions and support is created. Please subscribe to marathon-testing group and post your message there. 

      To subscribe visit: http://groups.google.com/group/marathon-testing 

      Thanks and Regards 
      KD