Page 1 of 1

Smart Fox Client API Entities.Initialize() Question

Posted: 23 Jun 2009, 17:25
by dlong
This is probably best answered by Thomas.

In this method, there is a hashtable that gets initialized. The problem is that I'm trying to create more than one to connection to my server and this section chokes because it's trying to add duplicate keys to the ascTab hashtable.

Actual code:

Code: Select all

internal static void Initialize() {
//--- XML Entities Conversion table ----------------------
ascTab.Add(">", ">");


Another way:

Code: Select all

internal static void Initialize() {
//--- XML Entities Conversion table ----------------------
ascTab[">"] = ">";


I'm just curious if this is the intended design? If so, what are the ramifications of modifying this code as above to support multiple connections? If not, will there be any updates that fix this behavior.

Let me know what you think Thomas.

Best,

DL

Posted: 24 Jun 2009, 16:59
by ThomasLund
Ahhh - right - not a scenario that I've got a testcase for.

You can solve that by adding a ascTab.Clear(); as the first statement. Saves you from reworking more than one line.

I'll write that on the todo list for next release.

:-)

/Thomas

Posted: 24 Jun 2009, 19:29
by dlong
Thanks Thomas!!! You're the best!!! :)