Hi, ----- Original Message ----- From: Robert Skowronek(o2) To: Harbour Project Main Developer List. Sent: Wednesday, January 13, 2010 4:21 PM Subject: [Harbour] MemoEdit() and Lastkey(), Escape
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. Best regards Robert 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. Best regards Robert
_______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
