> Perry Kappetein wrote:
>> Hello,
>> First of all, I am new to this list, and wasn't aware that there was a
>> mailinglist available.
>> Hopefully someone is able to help me with this.
>> I am working on a download manager, and using the
>> HTTPMultipartdownloader component.
>> For now I have 5 different HTTPMultipartdownloader components on my
>> form, but I think I should be able to do it with only 1.
>> like HTTPMultipartdownloader[xx]  ?
> One instance of TMultipartHttpDownloader can handle one download.
> If you want to access multiple instances by index create a TList or
> TComponentList at run time and add your instances once on program
> start. Access the instances with a type cast like 
> TMultipartHttpDownloader(MyList[0]) or derive your custom TComponentList
> that accepts and returns TMultipartHttpDownloader objects rather than
> TComponent.


starting with D2009 or D2010 you can also use the generic TObjectList<>
from Generics.Collections and save those typecasts:

vas MyList:TObjectList<HTTPMultipartdownloader>;

  MyList := TObjectList<HTTPMultipartdownloader>.Create(true);

  // create one downloader and add it...
  // create one downloader...

  // use them
  MyList[2].Tag := 4711;


To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to