On Oct 3, 2006, at 11:33 AM, [EMAIL PROTECTED] wrote:

You could use a dictionary. First, store your values from your config file into a dictionary, and then copy them to your local variables, if you so desire.

// get info from config file

Dim dTmp As New Dictionary

For... loop through your config file

  dTmp.Value(<key>) = <value>

Next

// copy info to variables

weight = dTmp.Lookup("weight", <defaultvalue>)
maxSpeed = dTmp.Lookup("maxSpeed", <defaultvalue>)

// done.

I don't see how this will save me much work. I still have to create code for every possible value it seems. I mean I already have objects with named properties, there has to be some smart way to take something like car.maxspeed = 248 from a config file and get it into a car object with a maxspeed property. This would be simple in javascript.

Kevin

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to