Re: Extracting a variable array from a split string (please help)
From: Dan Watson (staticfish_at_tiscali.co.uk)
Date: 07/06/04
- Next message: Bob Butler: "Re: Visual Basic 2005"
- Previous message: Gale Green: "Re: Extracting a variable array from a split string (please help)"
- In reply to: Russ Holsclaw: "Re: Extracting a variable array from a split string (please help)"
- Next in thread: Bob O`Bob: "Re: Extracting a variable array from a split string (please help)"
- Reply: Bob O`Bob: "Re: Extracting a variable array from a split string (please help)"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 06 Jul 2004 23:33:06 +0100
Russ Holsclaw wrote:
>>I'm going to rephrase my original question so its easy to understand
>>without all of the waffle
>>
>>say I have this string
>>
>>NICK¤¶£DanNICK¤¶£PeteNICK¤¶£JoanNICK¤¶£Bill
>>
>>I can split this up at the moment, but only the first one... so i get
>
> "Dan"
>
>>How do i put them in a variable array so that when it comes to adding
>>them to the treeview I get:
>>
>>Treeview1.Nodes.Add "MAIN", tvwChild, , (dat), 2, 2
>>
>>-Names
>>-Dan
>>-Pete
>>-Joan
>>-Bill
>>
>>I guess some clever splitting and looping needs to be done but im not
>>sure what.. Please help!
>
>
> Looking at your original post, that showed that this crazy string
> originates from a misuse of TCP/IP protocol, I'd suggest that the fix
> should be applied in the server software: put a proper delimiter (such as
> vbCrLf) at the end of each string that you send. From what you said, you
> had applied a "workaround" of using a time-delay as a kind of "delimiter".
> The basic problem is that you didn't understand that consecutive
> ".SendData" invocations would pack the strings into the same packet. Since
> you did this without an ending delimiter, the program at the receiving end
> had that much more difficulty picking the needles out of the haystack.
>
> My three-plus decades as a programmer tell me that the best place to fix a
> bug is the place where the bug is, not downstream of it.
>
> I'm not even going to ask where you got the idea of using the "¤¶£" string
> as a delimiter in your off-the-wall protocol.
>
Whats wrong with the "¤¶£" splitter?
- Next message: Bob Butler: "Re: Visual Basic 2005"
- Previous message: Gale Green: "Re: Extracting a variable array from a split string (please help)"
- In reply to: Russ Holsclaw: "Re: Extracting a variable array from a split string (please help)"
- Next in thread: Bob O`Bob: "Re: Extracting a variable array from a split string (please help)"
- Reply: Bob O`Bob: "Re: Extracting a variable array from a split string (please help)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|