-----Original Message-----
From: dave [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 29, 2004 1:38 AM
To: CF-Talk
Subject: includes and cfc's

> can u include an include in a cfc?

You can, but it's better to pretend you can't.

There's a nasty little side effect of CFINCLUDE in CFCs: when you CFINCLUDE
inside a CFC method all VAR scoped (private) variables are transferred to
the CFCs "Variables" scope.  This is, presumably, to allow the CFINCLUDed
code to see those values.

However all it really does is create a situation where you simply can't
create a persistent, thread-safe CFC - it effectively destroys any
thread-protection you've creating using method-private values.

That's why, in the end, it's much, much simpler and much, much safer to just
pretend that you can't CFINCLUDE inside a CFC.

Jim Davis



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=34

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182902
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

Reply via email to