How smart is Jade with updates.

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

How smart is Jade with updates.

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:43 am

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

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: How smart is Jade with updates.

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:43 am

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.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: How smart is Jade with updates.

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:44 am

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.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 37 guests