<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi folks,<br>I had some minutes of sparetime and went through control.inc.<br><br>Two things I d' like to ask:<br><br>1.) sometimes "parent"/"FParent" are checked for nil, before the method access it, and sometime not.<br>     Is this by purpose or are this potential Access-Violation candidates.<br><br>2.) In my programming-style I often check the conditions of input parameters at the begin of the method and <br>     leave with "exit"-statement if the conditions do not match the current needs.<br><br>As for example like here:<br>procedure TControl.ParentFontChanged;<br>begin<br>  if csLoading in ComponentState then exit;<br><br>Such things make the code much better readable.<br><br>I also use this in situations like this:<br><br>procedure
 TControl.SetColor(value : TColor);<br>begin<br>  if FColor <> Value then<br>  begin<br>    FColor := Value;<br>    FParentColor := False;<br>    Invalidate;<br>  end;<br>end;<br>There is no need for begin/end-statement.<br>if FColor=Value then exit;<br><br>Are there any rules for lazarus in this case or can everyone handle this as he likes ?<br><br>Greets,<br><br>Sam<br><br></div></div><br>



      </body></html>