[Lazarus] why handle is 0?
FreeMan
freeman35 at delphiturkiye.com
Thu Dec 11 12:09:49 CET 2014
If I'm not wrong I found my bug in the 4. day
Component has :
procedure LMTimer(var Message: TLMTimer); message LM_TIMER;
here is hold to timerevent
....
var B : boolean;
begin
if csLoading in ComponentState then Exit;
if (FTimerID = 0) then begin
FTimerID := SetTimer(Self.Handle, 1, 500, nil); <-- start
DebugLn(['UpdateTimer;FTimerID > ', FTimerID, ' : Self.Handle >',
Self.Handle]);
end;
....
here is destroy event of component
var B : Boolean;
begin
DebugLn(['Destroy;> ', 1]); //destroy started
if (FTimerID <> 0) then begin
DebugLn(['Destroy;FTimerID > ', FTimerID, ' : Self.Handle >',
Self.Handle]);
B := KillTimer(Self.Handle, FTimerID);
DebugLn(['Destroy; FTimerID > ', FTimerID, ' : Self.Handle >',
Self.Handle, ' Killed>', B]);
FTimerID := 0;
end;
DebugLn(['Destroy;> ', 2]);//destroy ended
and this is debug lines:
UpdateTimer;FTimerID > 1 : Self.Handle >_*140042733101744*_
TMainIDE.DoFixupComponentReferences UNRESOLVED BEFORE loading 0
Root=FRM_Appointment:TFRM_Appointment RefRoot=DM Refs="MainConn"
Destroy;> 1
Destroy;FTimerID > 1 : Self.Handle >_*0*_
Destroy; FTimerID > 1 : Self.Handle >_*0 *_Killed>False
Destroy;> 2
where is my handle ? why its "0" if its come 0 howto access self handle
so access then childs?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20141211/7d862141/attachment-0002.html>
More information about the Lazarus
mailing list