Dear Przemek,
Fixed. It is working properly. Thanks a lot.
Best regards
Robert
----- Original Message -----
From: "Przemysław Czerpak" <[email protected]>
To: "Harbour Project Main Developer List." <[email protected]>
Sent: Wednesday, January 13, 2010 11:28 PM
Subject: Re: [Harbour] MemoEdit() and Lastkey(), Escape
On Wed, 13 Jan 2010, Robert Skowronek(o2) wrote:
Hi,
Dear All,
Another issue that bother me that used to work in Clipper but opposite
behavior in Harbour.
MemoEdit(usertxt,9,1,16,78,.T.,NIL,120)
When I open memo edit widow and close immediately by ESC without any
update, I have K_ESC in LASTKEY(). It is fine.
However, if I do any change in a memo text and next also leave the
screen by ESC, the LASTKEY() function returns me K_CTRL_W (why?);
consequently I am not able to distinguish when user wants to discard or
save his changes.
Kindly advice.
Litle sample to demonstrate differences between
Clipper 5.2e and Harbour 2.0.0
----------------------------
PROCEDURE MAIN
MEMVAR txt
PRIVATE txt
txt := 'Test'
CLEAR SCREEN
@8,0 TO 17,79
MemoEdit(txt,9,1,16,78,.T.,NIL)
@20,0 SAY STR(Lastkey())
Inkey(0)
RETURN
---------------------
Scenario
1) Exit from Memo by ESC without any change in txt
LASTKEY() returns 27 (ESC). Correct
2) Any edition in memo text and next exit by ESC
LASTKEY() returns 23 (CTRL_W). Incorrect because CTRL_W when save. It
sould have been 27 (ESC) too.
Thank you very much for the code example.
It has been partially fixed by Viktor:
2010-01-13 15:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
Viktor this example shows that Clipper does not overwrite LastKey()
when it executes
Abort Edit? (Y/N)
and shows 27 instead of ASC( "Y" )
Can you check it?
Robert can you try current SVN code?
best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour