Le 03/10/06 16:19, « [NOM] » <[ADRESSE]> a écrit :

> 
> 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.
> 
Maybe it would be simpler because java is interpreted (tell me if I'm wrong)
but it is also much slower to execute

For myself, I prefer coding a bit more and having a much faster execution.


> 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>


_______________________________________________
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