Re: Re[2]: Illegal operation

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

Hi Aku,

> I just trying mts sugestion to use type as procedure.

Try this minor change to your example. I use two edittext fields....
-----------------
include win32lib.ew

constant
win = create(Window,"WOW",0,50,50,300,400,0),
tx = create(EditText, "", win, 100,100,100,100,0),
tx2 = create(EditText, "", win, 100, 200, 100, 100, 0)

type ttx(sequence st)
    setText(tx2, st)
    return 1
end type

global ttx txt

procedure tx_onClick()
    txt = sprintf("%d", rand(1000))
end procedure
onChange[tx] = routine_id("tx_onClick")


WinMain(win, Normal)
-----------------------

> But can't the error caught by win32lib and show an error
> message, or if cannot, maybe euphoria run-time error, instead of
> kernel illegal operation.

The problem, for the general case, is trying to determine what exactly is
the error. There is no easy way to know that a problem is happening until
Windows crashes. For this specific situation, I can get Win32lib to detect a
potential recursive descent into the pit and handling it a bit more
gracefully.

-----------
Derek Parnell
Melbourne, Australia
"To finish a job quickly, go slower."

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

Search



Quick Links

User menu

Not signed in.

Misc Menu