[lazarus] Custom LCL components still bugging me

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Nov 14 12:14:37 EST 2002


On 14 Nov 2002 11:25:55 -0500
andrew johnson <acjgenius at earthlink.net> wrote:

> well.. first things first.. realocmem can have unpredictable results on
> an uninitialized block.. since this is uninitialized it might be
> contributing to the problem. You should instead init it with SoundFiles
> := nil;

TObject properties are auto initialized before the constructor is called.

I replayed Tony's description and found a bug in the find declaration.
This bug might also be the one, that Danie described (OI events).


Mattias


> 
> Andrew
> 
> On Thu, 2002-11-14 at 11:07, Tony Maro wrote:
> > In my ongoing effort to figure out why my custom controls aren't working
> > right from the IDE, I've run into something new.
> > 
> > If I compile into Lazarus JUST the TESDSound component I've made, create
> > a new project, drop it on the form...
> > 
> > Then drop a button on the form and try to add an onclick event to the
> > button Lazarus crashes.  (console output is attached)
> > 
> > Something odd is definately going on with custom components compiled in
> > - it MIGHT be my component code, so I'm not pointing fingers ;-)
> > 
> > The component by itself is available (if you haven't already downloaded
> > the cbbad.tgz from my previous mail) at:
> > 
> > http://members.telocity.com/~tonymaro/esdsound.tgz
> > 
> > The only place that I would think my code could affect things is in the
> > .create method which is simply:
> > 
> > constructor TESDSound.Create(AOwner: TComponent);
> > begin
> >      Reallocmem(SoundFiles, 0);
> >      NumSoundFiles := 0;
> >      inherited Create(AOwner);
> >      if csDesigning in ComponentState then exit;
> >      // design time affect should stop here...
> > 
> >      if enabled then begin
> >         SetEnabled(True);
> >      end;     
> > end;
> > 
> > 
> > Thanks,
> > 
> > Tony
> 
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives






More information about the Lazarus mailing list