> Looking at intake it struck me that if one is using torque then using
> setProperties and reflection is unnecessarily inefficient. We could have
> torque generate a setByName method like it generates getByName, and if
> implemented PP.setProperties would use it rather than reflection. This
> would need the addition of a setByName in BaseObject which throws a
> runtime error if not overridden (like getByName) and then have
> PP.setProperties do something like:
>
> 1) Try and cast object to BaseObject
> 2) If that succeeds, try and use setByName to set properties
> 3) If cast fails or setByName throws, use reflection instead.
>
> What do people think. It's a bit gnarly, and I'm not sure I'm proposing
> it yet, but it would speed up use of setProperties...

After Torque has generated this code you should rarely need to edit it by
hand (or look at it) and it would speed up setProperties.

Another feature that could be added to setByName() & getByName() is
something like getAllNames().  This will would make it easy to do stuff like
creating a generic table of objects without prior knowledge of the object.

If you're going to propose it - I'm in favour so far...

~ Leon



> Sean
>
> --
> Sean Legassick
> [EMAIL PROTECTED]
>       Ek is 'n man: niks menslik is vreemd vir my nie




------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to