Felipe Monteiro de Carvalho schreef:
On 3/13/07, Luiz Americo Pereira Camara <[EMAIL PROTECTED]> wrote:
Just one tip maybe would be better to dereference PMethod after assigned
check in the Callback proc

Ok, didn“t think about it.

Reattaching the patch, which this fixed. Now I tested with both nil
and non-nil methods.


IMHO Self.SetWindowLong is not so nice looking, SetWindowLong looks better.

To be on the safe side, I would always call SetWindowLong for GWL_USERDATA, if the method is nil, you can decide if you want to set it to 0 (nil) or to PMethod pointer referencing a nil method.

I think it is better to use an atom or setprop (like for WindowInfo). Maybe the user of AllocateHWnd wants to use the userdata for himself.

Vincent

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

Reply via email to