Sorry, I come back to the original thread problem : CFC scopes. Here are some more details one CFCs scopes and UDFs.
When you excecute a CFMODULE, the only scopes still available in the CFMODULE script are 'attributes' + request/url/form, so you have to re-include UDF Lib. Which means that UDF Lib scope (from the calling script) is not available in a script executed by CFMODULE. When you execute a CFC (or a custom tags), it should be the same. The only scopes still available in the CFC script are 'arguments' + request/url/form, but there is a problem : UDF Lib scope from the calling script is still available in the CFC (???). This is not logical. CFC should not be able to access UDF Lib scope from the calling script, it should behave like the CFMODULE. UDF have by default the "no prefix" scope, so I thought they would behave like "no prefix" variables. (and if I want a UDF function during all my request, then I put it in the "request" scope) So for me, this is a bug (a non-consistent behaviour). Don't you think? Benoit Hediard www.benorama.com -----Message d'origine----- De : Raymond Camden [mailto:[EMAIL PROTECTED]] Envoyé : dimanche 29 septembre 2002 21:06 À : CF-Talk Objet : RE: So many problems with CFC scopes... > > For what reason? I've jumped in mid-thread here, but I'm > really keen to get > some good nitty-gritty low-down on the pros/cons/appropriate > contexts for > custom tags/UDFs/CFCs. > > I've had access to CF5 for a while, but most of my clients > have been stuck > on CF4.5 hosts, so I've not really got into the habit of > UDFs. Now MX and > CFCs are here, I feel I should dive into the whole lot > knowing the practical > differences and arguments for each method. > > You mentioned typing the extra reference for CFCs (i.e. > myCFC.isEmail(...) > as opposed to isEmail() for a UDF). Beyond that - which is > obviously down to > the kind of personal preference that's not worth debating - > why would a CFC > set of methods as opposed to a UDF library be not "bad per > se, just maybe > not appropriate"? What's the "not appropriate" bit, in > performance/architecture terms, not personal > preference/coding style terms? > Dave mentioned a collection of UDFs called Math that would serve as a library. On a _completely_ personal level (ie, not performance, security, etc), I tend to think the methods of a CFC should be more tightly coupled - ie, have more of a reason then being together than just being mathematical. As a purely personal preference - that is why I wouldn't think it's appropriate. Yes, I know it's a very wishy-washy response - but as I said, it's a personal feeling. Also, with CFCs being such a new beast, what makes sense now and what makes sense 3 years from now will most likely be somewhat different. ======================================================================= Raymond Camden, ColdFusion Jedi Master for Hire Email : [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists