Re: Strange Edita behaviour...

new topic     » goto parent     » topic index » view thread      » older message » newer message

Still no joy.

Can you try running the following program and detail what happens:
include arwen.ew

constant DEMO = create(Window,	"Can you get two OK to appear?", 0, 0,
50,50,400,100,0)
constant LBL = create(Label,"press X",0,DEMO,10,10,200,25,0)
constant LBL2 = create(Label,"",	0,DEMO,10,40,200,25,0)

integer stage
	stage=1

sequence kset
	 kset={}

function handler_DEMO(integer id, integer msg, atom wParam, object lParam)

    if msg = WM_CHAR then
	kset=append(kset,{msg,stage,wParam,lParam})
	if stage = 1 and find(wParam,"xX") then
	    setText(LBL,"OK")
	    stage = 2
	    setText(LBL2,"press ]")
	elsif stage = 2 and wParam = ']' then
	    setText(LBL2,"OK")
	    stage = 3
	else
	    if find(wParam,"qQ") then ?9/0 end if
	    id = 0
	end if
    elsif msg = WM_KEYDOWN then
	kset=append(kset,{msg,stage,wParam,lParam})
	if not(stage=1 and find(wParam,"xX"))
	and not(stage=2 and find(wParam,{']'+128})) then
	    id = 0
	end if
    elsif msg = WM_SYSKEYDOWN then
	if not(stage=3 and find(wParam,{VK_MENU,VK_F4,' '})) then
	    kset=append(kset,{msg,stage,wParam,lParam})
	    id = 0
	end if
    elsif msg = WM_SYSCHAR and wParam!=' ' then
	kset=append(kset,{msg,stage,wParam,lParam})
	id = 0
    end if
    if id=0 then
	setText(LBL2,"Error: press Q for error report")
	stage = 3
    end if
    return 0
end function
setHandler(DEMO, routine_id("handler_DEMO"))

WinMain(DEMO, SW_NORMAL)


Regards,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu