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?

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

Reply via email to