(using Linux X86 32 Bit):

Initiating TTimer with fpGUI Widget Type issues a Range check error: Project eventtest raises exception class 'RunError(201)'



line 153  is


Result := PtrInt(Timer);


PtrInt in fact is "LongInt".
When stepping my example the value for the Timer variable is $B761AA00.
So the Longint will be negative and as THandle is PtrUInt which again is DWord, a range check exception is raised.

Changing the line to


Result := THandle(Timer);


makes the Timer work in my example

I don't know if this is appropriate for all Archs....

-Michael

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to