Board index » cppbuilder » TListView->Items->Add() bug (2)

TListView->Items->Add() bug (2)

This solution doesn't work either, the program crashes again the second time
the Add() is called. (further info, see thread TListView->Items->Add() bug
of yesterday)

this doesn't work either:

TListItem* ListItem;
ListItem = DirList->Items->Add();
ListItem->Caption = "..";

Does anyone know what to do ?
Thanks

Philipp

 

Re:TListView->Items->Add() bug (2)


Quote
: "Philipp" <pdru...@pdp.be> wrote:
>This solution doesn't work either, the program crashes again the second time
>the Add() is called. (further info, see thread TListView->Items->Add() bug
>of yesterday)

Why is there a bug in "TListView->Items->Add()".

--
General information:
  * Post to the right group - http://www.borland.com/newsgroups/
    * Do not cross- or multipost
      * Research at http://www.mers.com/searchsite.html

Stefan Hoffmeister - http://www.econos.de/
TeamB - http://www.teamb.com/

Re:TListView->Items->Add() bug (2)


ok, a bug in my program then
but i can't find it
and if I compile a previous version (with for that function exactly the same
code) it compiles fine (but i can't use the previous version, because too
many parts of it have changed)

Stefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> schreef in
berichtnieuws 0pho7s48nnme231v22vat956gog9e42...@4ax.com...

Quote
> : "Philipp" <pdru...@pdp.be> wrote:

> >This solution doesn't work either, the program crashes again the second
time
> >the Add() is called. (further info, see thread TListView->Items->Add()
bug
> >of yesterday)

> Why is there a bug in "TListView->Items->Add()".

> --
> General information:
>   * Post to the right group - http://www.borland.com/newsgroups/
>     * Do not cross- or multipost
>       * Research at http://www.mers.com/searchsite.html

> Stefan Hoffmeister - http://www.econos.de/
> TeamB - http://www.teamb.com/

Re:TListView->Items->Add() bug (2)


Quote
: "Philipp" <pdru...@pdp.be> wrote:
>ok, a bug in my program then
>but i can't find it

Then post 20 lines of source code reproduce your problem. Please note that
the source code should compile on any system, not just cut+paste from your
code.

--
General information:
  * Post to the right group - http://www.borland.com/newsgroups/
    * Do not cross- or multipost
      * Research at http://www.mers.com/searchsite.html

Stefan Hoffmeister - http://www.econos.de/
TeamB - http://www.teamb.com/

Re:TListView->Items->Add() bug (2)


ok, i will, later on (i'm at work now)

Stefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> schreef in
berichtnieuws 1ioo7ssv7sal9c865tmobroef8q0md0...@4ax.com...

Quote
> : "Philipp" <pdru...@pdp.be> wrote:

> >ok, a bug in my program then
> >but i can't find it

> Then post 20 lines of source code reproduce your problem. Please note that
> the source code should compile on any system, not just cut+paste from your
> code.

> --
> General information:
>   * Post to the right group - http://www.borland.com/newsgroups/
>     * Do not cross- or multipost
>       * Research at http://www.mers.com/searchsite.html

> Stefan Hoffmeister - http://www.econos.de/
> TeamB - http://www.teamb.com/

Re:TListView->Items->Add() bug (2)


Found the bug!
Apparently it had something to do with a '\0' character I wrote at the end
of a char* , I forgot to malloc a byte more for the '\0', so the memory
allocation was overwritten.

Thanks for all your help though ...

Quote
Philipp <pdru...@pdp.be> wrote in message

news:85hsdn$5jc14@bornews.borland.com...
Quote
> ok, i will, later on (i'm at work now)

> Stefan Hoffmeister (TeamB) <Stefan.Hoffmeis...@Econos.de> schreef in
> berichtnieuws 1ioo7ssv7sal9c865tmobroef8q0md0...@4ax.com...
> > : "Philipp" <pdru...@pdp.be> wrote:

> > >ok, a bug in my program then
> > >but i can't find it

> > Then post 20 lines of source code reproduce your problem. Please note
that
> > the source code should compile on any system, not just cut+paste from
your
> > code.

> > --
> > General information:
> >   * Post to the right group - http://www.borland.com/newsgroups/
> >     * Do not cross- or multipost
> >       * Research at http://www.mers.com/searchsite.html

> > Stefan Hoffmeister - http://www.econos.de/
> > TeamB - http://www.teamb.com/

Other Threads