I'm invoking a cfc with createObject: 

x = createObject("component", "location");
xresult = x.blah(country=thecountry,weight=theweight);

This works fine, but I want to pass the dns info in to the cfc and put them
the variables scope for use by all functions. I assume there is no way to
pass variables to the cfc in the createObject function, so, instead of
automatically calling the init() at the beginning of the cfc, I thought to
do it like this and pass in the dns variables:

x = createObject("component", "location").init(request.DS);
xresult = x.BLAH(a=theA, b=theB);

But then suddenly I get the error of:

 "Cannot invoke method BLAH on an object of type java.lang.String with named
arguments. Use ordered arguments instead."

Except using ordered arguments doesn't work. And, again, removing
".init(request.DS)" from the line above makes it work fine. (Also, removing
the 2nd line runs the 1st line with .init without error.) 

Can someone tell me what's going on and what to do?

Thanks.

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to