Mailingliste - Einträge 2006

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] What does MPRC event actually do with components and numeric index

  • Subject: Re: [qftestJUI] What does MPRC event actually do with components and numeric index
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: 09 Jun 2006 09:48:18 +0200

Hello Mark,

there's no problem in mixing scripts with qftest nodes to achieve
something that is not easily done with nodes alone. That's exactly
what SUT scripts are for :-)

As for your question: qftest first determines the location of the
target "item" (line, position, etc.) then simulates mouse MOVED,
PRESSED, RELEASED and CLICKED events on that location plus the offset
from the MPRC node's X and Y attribute. qftest doesn't call
setCaretPosition at all, that's a side effect from the mouse events.

Best regards,

"Michaelis, Mark" <mark.michaelis@?.com> writes:

> Hello,
> I currently have a problem to place the cursor at the correct location in a
> JTextPane. 
> The specific problem:
> The underlying document used is a HTMLDocument (a derived class) and I want
> to place the cursor into a table cell. As the cell is empty I need to use
> numeric indices. I want to write a procedure which is somewhat more generic
> and allows the user to set the cursor by row/cell indices into the table.
> Analysis so far:
> While I may have found a way doing so with setCaretPosition I would prefer
> to actually stay as close to the qftest functions as possible. I observed
> that MPRC with numeric index actually does not use setCaretPosition but
> makes something different. E. g. for a content like:
> 123<br/>
> the cursor will remain in front of "1" for indices 0 to 3 and for index 4 it
> will jump to the next empty line. In contrast with setCaretPosition() you
> can place the cursor anywhere inside this string.
> So perhaps the actual description how this index is handled would help to
> find a solution for the focus problem.
> Regards
> 	Mark
> --
> Mark Michaelis
> Software Engineer Quality Assurance
> CoreMedia AG
> Ludwig-Erhard-Str. 18
> 20459 Hamburg, Germany

Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH           
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876