[thelist] CF: Values transposition. Too ugly, needs a face lift.

Frank lists at frankmarion.com
Tue Aug 2 13:55:04 CDT 2005


I've written a custom tag that builds a tree based on values in my 
database. It uses the typical parent/child scheme of record_id (parent) and 
parent_record (child).

Because the tag uses attributes that refers to the db itself (such as 
db_parent_field, db_child_field) I end up using a very inefficient manner 
of getting at the value of said variables as such:

<cfset parent_field_value = Evaluate("get_current_items." & db_parent_field)>
<cfset parent_field_value = Evaluate(parent_field_value)>

Can anyone suggest a better way?

Please see http://www.frankmarion.com/demo/recurse.txt for the tag itself. 
Do a find of "Ugly hack"

Thanks



Frank Marion     lists at frankmarion.com      Keep the signal high.




-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.7/60 - Release Date: 2005-07-28




More information about the thelist mailing list