DarekM wrote:
Vincent Snijders napisaƂ(a):

darekm wrote:

Hi
attached patch added:
 ChecklistBox.onClickCheck (for GTK and GTK2)
publish property  TCheckBox.font
remove tCustomLabel.FontChange(Sender: TObject); (default is fontchanged)



Thanks for the patch. I have the following questions:

Why is the following debugln commented out? Doesn't calling DestroyHandle, if the handle is not allocated, mean that there is a bug somewhere? Raising the exception is maybe too harsh, but silently ignoring it, doesn't seem a good idea to me.

@@ -3287,7 +3292,8 @@
   AWinControl: TWinControl;
 begin
   if not HandleAllocated then begin
- DebugLn('Warning: TWinControl.DestroyHandle ',Name,':',ClassName,' Handle not Allocated'); + //DebugLn('Warning: TWinControl.DestroyHandle ',Name,':',ClassName,' Handle not Allocated');
+    exit;
     //RaiseGDBException('');
   end;

Delphi don't claim when handle =0

In that case, IMHO Delphi is too tolerant for component writers.

But maybe other developers see valid reasons for calling DestroyHandle when a handle is not allocated (anymore).



<snip>

@@ -132,6 +139,12 @@
   FItemDataOffset := inherited GetCachedDataSize;
 end;
+
+procedure tCustomCheckListBox.DoChange(var Msg);


<snip>

+procedure tCustomCheckListBox.ClickChecked;


Why not TCustomCheckListBox.DoChange and TCustomCheckListBox.ClickChecked?

I'm not undestand.
ClickChecked - name the same like in Delphi
DoChange - Lazarus use LM_Change message (the same like in tCheckBox), Delphi don't use messages

Sorry, this maybe a bit nitpicking:
Your patch:
tCustomCheckListBox.ClickChecked
My proposal:
TCustomCheckListBox.ClickChecked

Note the capitalized first letter.

Vincent

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to