Hi Viktor,
My test cannot fail with the current version of TGET since :Pos()
will not allow the assignment to :nPos of a non-editable position.
Therefore, this issue is closed. HOWEVER...
I do not like to see such fragile code - The loop in :DelEnd() is
highly dependent on other methods in o
Hi Randy,
Okay, that clears it up.
Before implementing your fix, I think it would be
best to find such a test case which exploits it.
This way maybe we can even find a better fix on
lower level.
Brgds,
Viktor
On 2008.06.26., at 15:15, Randy Portnoff wrote:
Hi Viktor,
I am very sorry, I jus
Hi Viktor,
I am very sorry, I just realized I am using an older version of TGET
- In the current TGET, the :Pos() method does not allow the
assignment of a non-editable position to the :nPos var - Therefore,
in the case below, when you assign o:pos := 1, it is actually
assigning 2 and thereby
Hi Randy,
I've added a small test case, but I couldn't reproduce the loop:
cStr07 := Space(20)
SetPos( 14, 16 )
o := _GET_( cStr07, "cStr07", "(999) 999-",, )
o:display()
o:setFocus()
o:pos := 1
o:delEnd()
What am I missing?
Brgds,
Viktor
On 2008.06.25., at 19:27, Ran
Hi Viktor,
Ok, I think I know what is happening here and is partially my fault -
However, I still feel that extra protection needs to be added to this loop.
The picture is "(999) 999-"
When this endless loop occurs, I am doing this:
oGet:Pos := 1
oGet:DelEnd()
I say this is my fault sin
Hi Randy,
Probably. If we can get a small test case
together, I will add it to rto_get.prg, and
I can try it with Clipper too.
So, var is 20 chars string, picture is "(999) 999-".
What keys do you press to get into the endless loop?
Brgds,
Viktor
On 2008.06.25., at 18:04, Randy Portnoff wr
Hi all,
I think there is a bug in TGET's delEnd() method - The loop...
DO WHILE ::nPos > nPos
::backSpaceLow()
ENDDO
...can become endless in some circumstances. While I cannot reproduce
it in a DOS app, my GUI app (that implements its own masked edits
using TGET) can using a 20-character