Author | Message | ||
---|---|---|---|
NeiSep Ametuar Posts: 93 | Ok hello again lol well i have been posting this on some other forum without success you all probly know DC hehe atleast the most do so anyway you know how Hubregistration works and so on. Well got an problem with TStringList well i can add new things to the list but i cant update the list with new info like for exampel i got a client sends me this: [ADSL]Maximum Speed][Test|netfree.homeunix.net|[ADSL]Maximum Speed][20GB][Test - www.maximumspeed.se|1|0| ok this would be the old text then and that is added to the StringList okey. now we get a new info like this: [ADSL]Maximum Speed][Test|netfree.homeunix.net|[ADSL]Maximum Speed][20GB][Test - www.maximumspeed.se|1230|0| You see only digits have changed but you should be able to change the rest to anyway now i want to update this text so the old text get overwrited with this new text. So the unique for this would be the adress so i got to search for the adress in the StringList and then replace the whole line and add the new line in that possition. Anyone here who can help me with that i tried this:
| ||
Mickey Ametuar Posts: 115 | The easiest way is to change the whole string.
| ||
NeiSep Ametuar Posts: 93 | but doesnt this mean the same? Hubs[i] := fulllist; ?? | ||
Meka][Meka Unstopable Posts: 700 | yes it does, so maybe u will need to make some kind of object with a stringlist in, and a string as the hubname, then u can loop thru the oibjects to find which is correct, and then change the info, create a hubinfo builder function type of thing. If i wasnt working so much i would write an example...if i do get time, i will... | ||
Mickey Ametuar Posts: 115 |
If your fulllist is a string type then yes. I couldn't read from your code part how you declared. Just do what Meka told. |