🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #5402

TIdIRC's OnNames

#5402
From: Tog
Date: Fri, 03 Sep 2004 00:12
32 lines
1654 bytes
Hi,

i'm running this code in the OnNames event:

TTeListBox *myListBox = NULL;
myListBox = FindListBox(AChannel->Name);
if (myListBox)
        {
        myListBox->Clear();
                for (int j=0; j < AUsers->Count; j++)
                        {
                        if (AChannel->Names->Objects[j] == (TObject*) 1)

myListBox->Items->Add("@"+AUsers->Items[j]->Nick);
                        else if (AChannel->Names->Objects[j] == (TObject*)
2)

myListBox->Items->Add("+"+AUsers->Items[j]->Nick);
                        else

myListBox->Items->Add(AUsers->Items[j]->Nick);
                        }
        }

I get a crash on AUsers->Count, it's not accessable it seems, nothing is
returned, so my loop just goes into an "Out of Index(some number)"...

Is this an Indy bug or am I doing something wrong?

Using Indy 9 in BCB 6.

Thanks!
Technical Details
Message-ID: <4137b6d9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f843ea76483f5354,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: <Tog>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: TIdIRC's OnNames
Date: Fri, 3 Sep 2004 02:12:11 +0200
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 83.109.22.154
Message-ID: <4137b6d9$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1094170329 83.109.22.154 (2 Sep 2004 17:12:09 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail