Hello All
Here is weired behavior
#include 'memoedit.ch'
#include 'setcurs.ch'
#include 'inkey.ch'
Function Main()
Local cText := 'This is initial text'
Local lEditMode := .F.
DO WHILE .T.
cText := MEMOEDIT( cText, 3,6,20,76, lEditMode, "EditFunc", 50 )
if lastkey() == 27
exit
endif
ENDDO
Return nil
//----------------------------------------------------------------------//
Function EditFunc( nMode, nRow, nCol )
Local nKey := Lastkey()
STATIC nLoop := 0
DO CASE
CASE nMode == ME_INIT
nLoop++
uiDebug( nLoop )
DO CASE
CASE nLoop == 1 // Set insert mode
SetCursor( SC_SPECIAL1 )
RETURN K_INS
CASE nLoop == 2 // End initialization
RETURN ME_DEFAULT
ENDCASE
CASE nMode == ME_IDLE
OTHERWISE
IF nKey == K_INS
IF ReadInsert()
SetCursor(SC_NORMAL)
ELSE
SetCursor(SC_SPECIAL1)
ENDIF
ENDIF
ENDCASE
RETURN ME_DEFAULT
//----------------------------------------------------------------------//
Application just disappears. Disappearance is caused by repeated calls to
cUDF.
ME_INIT is called only once but it must been called more than once in above
code.
If lEditMode == .T. it works fine.
Regards
Pritpal Bedi
--
View this message in context:
http://www.nabble.com/MemoEdit%28%29---Bug-if-cUDF-%3D%3D-YES-and-EditMode-%3D%3D-NO-tp20450013p20450013.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour