Luiz Americo Pereira Camara wrote:
Felipe Monteiro de Carvalho wrote:
Forgot to attach the patch =)
Just one tip maybe would be better to dereference PMethod after
assigned check in the Callback proc
Method := PMethod^; //-> if PMethod is nil there would be problems
if Assigned(PMethod) then
Method(Msg)
Did you tested passing Method as nil in AllocateHwnd ? In this case you
can get an access violation here, since PMethod would point to nil.
Maybe was a typo and you mean Assigned(Method) instead of Assigned(PMethod)?
In this case the code below does not make sense
Luiz
as alternative you can skip one assignment (Method copy):
// Method := PMethod^; delete this
if Assigned(PMethod) then
PMethod^(Msg)
PS: not tested.
Luiz
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives