<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Self_Handle: HWND;<br>
I added this variable, and set "Self_Handle := Self.Handle;" in
component "loaded" event, create still have not handle!<br>
<br>
<br>
Loaded;> 1 Self_Handle >140091380829392 Self.Handle
>140091380829392<br>
UpdateTimer;FTimerID > 1 : Self.Handle >140091380829392<br>
TMainIDE.DoFixupComponentReferences UNRESOLVED BEFORE loading 0
Root=FRM_Appointment:TFRM_Appointment RefRoot=DM Refs="MainConn"<br>
Destroy;> 1 Self_Handle >140091380829392<br>
Destroy;FTimerID > 1 : Self.Handle >0 Self_Handle
>140091380829392<br>
Destroy; FTimerID > 1 : Self.Handle >0 Self_Handle
>140091380829392 Killed>True <u><b><big><--- timer has to
killed or widgetset say lie :)</big></b></u><br>
Destroy;> 2<br>
Destroy;> 99 <-- component destroyed last line <br>
<br>
reopen form, ofcourse handle changed, but(FTimerID) SetTimer return
2 at this time?<br>
<br>
Loaded;> 1 Self_Handle >140091456299056 Self.Handle
>140091456299056<br>
UpdateTimer;FTimerID > 2 : Self.Handle >140091456299056<br>
TMainIDE.DoFixupComponentReferences UNRESOLVED BEFORE loading 0
Root=FRM_Appointment:TFRM_Appointment RefRoot=DM Refs="MainConn"<br>
Destroy;> 1 Self_Handle >140091456299056<br>
Destroy;FTimerID > 2 : Self.Handle >0 Self_Handle
>140091456299056<br>
Destroy; FTimerID > 2 : Self.Handle >0 Self_Handle
>140091456299056 Killed>False <u><b><big><-- at this time
can NOT killed timer so problem start</big></b></u> "B :=
KillTimer(<b>Self_Handle</b>, FTimerID);"<br>
Destroy;> 2<br>
Destroy;> 99<br>
QCoreApplication::postEvent: Unexpected null receiver<br>
QCoreApplication::postEvent: Unexpected null receiver<br>
QCoreApplication::postEvent: Unexpected null receiver<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 11-12-2014 13:09, FreeMan wrote:<br>
</div>
<blockquote cite="mid:54897B7D.1020607@delphiturkiye.com"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
If I'm not wrong I found my bug in the 4. day<br>
<br>
Component has :<br>
procedure LMTimer(var Message: TLMTimer); message LM_TIMER;<br>
<br>
here is hold to timerevent<br>
....<br>
var B : boolean;<br>
begin<br>
if csLoading in ComponentState then Exit;<br>
if (FTimerID = 0) then begin <br>
FTimerID := SetTimer(Self.Handle, 1, 500, nil); <-- start <br>
DebugLn(['UpdateTimer;FTimerID > ', FTimerID, ' :
Self.Handle >', Self.Handle]);<br>
end;<br>
....<br>
<br>
here is destroy event of component<br>
var B : Boolean;<br>
begin<br>
DebugLn(['Destroy;> ', 1]); //destroy started<br>
if (FTimerID <> 0) then begin<br>
DebugLn(['Destroy;FTimerID > ', FTimerID, ' : Self.Handle
>', Self.Handle]);<br>
B := KillTimer(Self.Handle, FTimerID);<br>
DebugLn(['Destroy; FTimerID > ', FTimerID, ' : Self.Handle
>', Self.Handle, ' Killed>', B]);<br>
FTimerID := 0;<br>
end;<br>
DebugLn(['Destroy;> ', 2]);//destroy ended<br>
<br>
<br>
and this is debug lines:<br>
<br>
UpdateTimer;FTimerID > 1 : Self.Handle ><font
color="#ff0000"><u><b><big>140042733101744</big></b></u></font><br>
TMainIDE.DoFixupComponentReferences UNRESOLVED BEFORE loading 0
Root=FRM_Appointment:TFRM_Appointment RefRoot=DM Refs="MainConn"<br>
Destroy;> 1<br>
Destroy;FTimerID > 1 : Self.Handle ><font color="#ff0000"><u><b><big>0</big></b></u></font><br>
Destroy; FTimerID > 1 : Self.Handle ><font color="#ff0000"><u><b><big>0
</big></b></u></font>Killed>False<br>
Destroy;> 2<br>
<br>
<br>
where is my handle ? why its "0" if its come 0 howto access self
handle so access then childs?<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
_______________________________________________
Lazarus mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a>
</pre>
</blockquote>
<br>
</body>
</html>