On Thu, 01 May 2008 21:58:20 -0400
Lee Jenkins <[EMAIL PROTECTED]> wrote:

>[...]
> >>>> Setting Mode to Delphi fixed it, but I'm curious as to how to get
> >>>> this to work in FPC mode.
> > Hi,
> > 
> > In FPC mode, your event assignments should prefix with '@' like
> > this:
> > 
> > constructor TPOSButton.Create(AOwner: TComponent);
> > begin
> >    inherited Create(AOwner);
> >    Self.OnMouseDown := @HandleMouseDown;  // <== handlers with
> > correct signatures. self.OnMouseUp := @HandleMouseUp;
> > end;
> > 
> > HTH,
> > Funky Beast
> 
> They were, but I had to change the mode to Delphi to get the String
> properties from throwing an AV when I tried to set them at design
> time.

Then you forgot the {$H+} switch to enable ansistrings.

Every lazarus unit begins with:
{$mode ObjFPC}{$H+}

Mattias
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to