To answer Michael's question, I was just thinking out loud, but the line of thinking came up because I had just completed the first bits of a generalized form validation cfc, and was thinking about how it contrasted to how I would do the same thing in OO javascript.
Perhaps though, as you say, there may not really be a need. -- mailto:[EMAIL PROTECTED] Sunday, March 16, 2003, 10:41:22 PM, you wrote: SID> I wouldn't expect it to be possible with the existing scope collections like SID> form or with native data types like arrays. In most cases I wouldn't expect SID> this to really be something people look for, largely because it's not SID> necessary for any custom framework (form validation for instance) that I'm SID> aware of -- using native functions and UDF's that work on arrays and SID> structures directly (<cfset checkformdata()> or <cfset x = arraylen(myarray)>>) isn't a workaround : it's the way it's done to begin SID> with. SID> Now if you're talking about adding methods to CFC's at runtime, such as SID> <cfset myCFC.doSomething = myUDF> that's a whole other story (and I suspect SID> could be useful in some situations, just as it is sometimes useful to group SID> UDF's into request structures and the like). I haven't got any clue if MX SID> supports it. I half expect it to be supported already, but I also half SID> expect it to not be supported. If it is supported, then rebuilding the SID> scopes (form,url,attributes,variables,request,etc) as CFC's similar to the SID> new custom java class for the Arguments array in functions, if these scopes SID> aren't already defined this way would provide the other functionality SID> (although I'm not sure if I agree that would be an advantage). >> Is there a way to attach a method/function to cf variable, >> be it a >> string, array, structure, etc at runtime? I don't think >> this is >> possible now, but it just popped into my head, and before >> I headed to >> the wishform, I was wondering if it, or a creative >> workaround already >> existed. >> For example, attaching a validate method to the form >> collection, or a >> length method to an array. >> -- >> mailto:[EMAIL PROTECTED] >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> ~~~~~~~~~~~| >> Archives: >> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 >> Subscription: http://www.houseoffusion.com/cf_lists/index. >> cfm?method=subscribe&forumid=4 >> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq >> This list and all House of Fusion resources hosted by >> CFHosting.com. The place for dependable ColdFusion >> Hosting. >> Unsubscribe: http://www.houseoffusion.com/cf_lists/uns >> ubscribe.cfm?user=633.558.4 SID> s. isaac dealey 954-776-0046 SID> new epoch http://www.turnkey.to SID> lead architect, tapestry cms http://products.turnkey.to SID> tapestry api is opensource http://www.turnkey.to/tapi SID> certified advanced coldfusion 5 developer SID> http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 SID> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

