is there some way of accessing a field in a type by using a variable name
instead of:
t.trigger=new trigger
t\xposition = 1
what if i had 'xposition' in a variable?
t\{fieldname} = value
is there any way to do this?
it would make data loading so much easier, because you could write nice files like this:
[newobject]=triggerarea
triggerid=4
x=10
z=10
width=5
depth=5
and be able to add new fields without having to add lines to your loading routine. even with a nice file structure like this, currently my load routine has to have at least 1 or 2 lines to handle each and every field. it's really clumsy. (where are perl hashes when you need them most??)
i don't want to get away from using types, but i guess if i had to i could use the 'soups' routines in the code archives. it's just that i anticipate a performance hit from the string manipulation going on during runtime.
anyone have any ideas?
instead of:
t.trigger=new trigger
t\xposition = 1
what if i had 'xposition' in a variable?
t\{fieldname} = value
is there any way to do this?
it would make data loading so much easier, because you could write nice files like this:
[newobject]=triggerarea
triggerid=4
x=10
z=10
width=5
depth=5
and be able to add new fields without having to add lines to your loading routine. even with a nice file structure like this, currently my load routine has to have at least 1 or 2 lines to handle each and every field. it's really clumsy. (where are perl hashes when you need them most??)
i don't want to get away from using types, but i guess if i had to i could use the 'soups' routines in the code archives. it's just that i anticipate a performance hit from the string manipulation going on during runtime.
anyone have any ideas?