You don't have implicit access to the request's 'variables' scope
inside a CFC instance.  You'll need to move the UDF into a scope where
the CFC internals can reference (request, application, etc.).  Though
I wouldn't recommend doing it that way.

A better route would be to put your UDF in a 'utilities' CFC, and then
use that CFC in both your current CFC and in your normal page
processing.  Better encapsulation that way.

cheers,
barneyb

On 9/26/05, Michel Deloux <[EMAIL PROTECTED]> wrote:
> Hi all
>
> It's possible to call cfscript functions(application.cfm's living)
> inside cfc component? I'm calling this function PrepareSearch and CF
> returns an error:
>
>
> Variable PrepareSearch is undefined.
>
>
> The error occurred in D:\Inetpub\wwwroot\ghost\components\qryGhost.cfc: line 
> 40
>
> 38 :                            <CFIF arguments.UserField is not "">
> 39 :
> 40 :                            
> #REReplaceNoCase(PrepareSearch("#arguments.UserField#","user"),";","'","All")#
>
> ....
>
> What's wrong?
>
> Cheers
>
> MD
>


--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219279
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to