Can anyone see anything wrong with doing the below???
<cfproperty name="ID" type="numeric" default="0">
<cfproperty name="Title" type="string" default="Mr">
<cffunction name="createDefaults" hint="">
<cfscript>
thiscfc = GetMetaData(this);
if (isDefined("thiscfc.properties")) {
for(i=1;i LTE ArrayLen(thiscfc.properties);i=i+1) {
if (StructKeyExists(thiscfc.properties[i],"default")) {
varname = "this.#thiscfc.properties[i].name#";
defaultvalue =
StructFind(thiscfc.properties[i],"default");
setvariable(varname,defaultvalue);
}
}
}
</cfscript>
<cfreturn true />
</cffunction>
also...
you can't seem to do this...
<cfscript>
i = "1";
this.#i# = value;
</cfscript>
is that right?
thanks Justin
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]