Can we see the actual code of the CFC?  Or at least a stripped down
version that you have confirmed has the same problem?

What are you returning from the init() method?  It needs to be
<cfreturn this />, otherwise 'x' will store nothing, which obviously
can't have methods called on it.

cheers,
barneyb


On Sat, 2 Oct 2004 10:00:22 +0700, r~ <[EMAIL PROTECTED]> wrote:
> 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.

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

I currently have 4 GMail invites for the taking
----------------------------------------------------------
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