It's one of those rare issues where you spend a few minutes to a few days trying to find out why a value is being set one way when it's supposed to be another. With small CFCs it should not be a problem, but once you get into large ones with internal function calls, you're getting into dangerous territory. I've seen a lot of CFCs with a query name set to the same thing as the CFC inside of it. As long as it's not recalled in the same run, you've got no problem. The issue came up where the same function was called twice internally to the CFC. This is rare, but does happen and will bite people in the rear. I don't see MM changing the scoping. All I suggested is an attribute to simulate the var for whatever is returned from the query. Instead of <CFSET var qQuery=""> <CFQUERY name="qQuery" ...> I'd like to see <CFQUERY name="qQuery" local="yes" ...>
Maybe in CFMX 7.1 or 8 (unless they slip it in on Blackstone when I'm not looking) > I don't really see the scoping issue as a big deal. I've used CFCs now > for well over a year, and, while it takes a bit to get used to with > regard to var scoping *all* your local vars, it's not such a big deal. > I would bet big money that there's no way Macromedia would change the > default scoping of variables at this point, if anything for > backwards-compatiblity. Also, on a personal level, if changes are > going to be made to CFCs, I'd rather see the focus of the engineers' > effort be on other features like interfaces rather than this. > > Regards, > Dave. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184023 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54