Page 1 of 1

How smart is Jade with updates.

Posted: Fri Aug 07, 2009 11:43 am
by ConvertFromOldNGs
by Carl Ranson >> Thu, 7 Oct 1999 20:49:20 GMT

Hi All,

Say I have a property that is used as a key or keypath.

Is jade smart enough that setting this property to its current value will not cause an update on the dictionaries

or should one write

if prop <> valueToSet then
prop := valueToSet;
endif;

to avoid the redundant updates.

CR

Re: How smart is Jade with updates.

Posted: Fri Aug 07, 2009 11:43 am
by ConvertFromOldNGs
by Dean Cooper >> Wed, 6 Oct 1999 21:08:43 GMT

Currently Jade does not perform this comparison. Setting a key property to its present value will propagate the update to related dictionaries. Performing the comparison yourself (especially if you have general "set" or "update" methods that set all properties on an object) is a good idea.

Dean.

Re: How smart is Jade with updates.

Posted: Fri Aug 07, 2009 11:44 am
by ConvertFromOldNGs
by Dean Cooper >> Wed, 6 Oct 1999 21:17:21 GMT

Ensure you have the latest edition of the object before you start comparing values though.

Dean.