{"id":4503,"date":"2014-03-30T12:29:11","date_gmt":"2014-03-30T12:29:11","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/thread-is-writing-on-desktop-collection-of-common-programming-errors\/"},"modified":"2014-03-30T12:29:11","modified_gmt":"2014-03-30T12:29:11","slug":"thread-is-writing-on-desktop-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/thread-is-writing-on-desktop-collection-of-common-programming-errors\/","title":{"rendered":"Thread is writing on desktop-Collection of common programming errors"},"content":{"rendered":"<p>I tried to make a runtime thread but the thread is behaving strangely, the code has no canvas reference.<\/p>\n<pre><code>procedure TBruteThread.Execute;\nvar\n  j: Integer;\nbegin\n  inherited;\n  FreeOnTerminate:=True;\n  for j:=1 to StrToInt(Form1.Edit1.Text) do begin\n    if Terminated then break;\n    Form1.Label2.Caption:=IntToStr(j);\n  end;\n  Form1.Label2.Caption:='Thread is destroyed';\n  Self.Terminate;\nend;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/UYt8f.jpg\" \/><\/p>\n<p>Someone have any idea to solve this strange problem?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I tried to make a runtime thread but the thread is behaving strangely, the code has no canvas reference. procedure TBruteThread.Execute; var j: Integer; begin inherited; FreeOnTerminate:=True; for j:=1 to StrToInt(Form1.Edit1.Text) do begin if Terminated then break; Form1.Label2.Caption:=IntToStr(j); end; Form1.Label2.Caption:=&#8217;Thread is destroyed&#8217;; Self.Terminate; end; Someone have any idea to solve this strange problem?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4503","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4503"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4503\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}