the returntype of the init function should be the fully qualified name
of the cfc
-Dave
>>> [EMAIL PROTECTED] 10/02/04 8:31 AM >>>
> This works fine:
> x = createObject("component", "location");
> xresult = x.blah(country=thecountry,weight=theweight);
> Not
> x = createObject("component", "location").init(request.DS);
> xresult = x.BLAH(a=theA, b=theB);
> then I get the error of:
> "Cannot invoke method BLAH on an object of type java.lang.String with
named
> arguments. Use ordered arguments instead."
>What are you returning from the init() method?
-It was returning true
>It needs to be <cfreturn this />, otherwise 'x' will store nothing,
which
obviously
can't have methods called on it.
-I see the mistake. Before x was the component; now it is merely "true".
I've changed it to return type "any" and "return this" and it works now,
thanks.
Is the return type "any" correct for a function returning itself?
Nothing
explicit?
stylo~
----------------------------------------------------------
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]
----------------------------------------------------------
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]