I've been banging my head against this for several hours now... 

I have a CFC with an init method that looks like this: 

<cffunction name="init" access="public" output="false">
        <cfargument name="datasource" type="any" required="true" />
        <cfargument name="settings" type="any" required="true" />

        ... do stuff with arguments...

        <cfreturn this />
</cffunction>

Of the hundreds of CFCs I've written, this is the only one that's ever
had this behavior. 

This works: 

CreateObject("component","my.cfc.path").init(
        datasource = datasourceObject,
        settings = settingsObject);

However these valid syntaxes all fail with the error "the SETTINGS
parameter to the init function is required but was not passed in", when
the arguments are known to be present, valid and correct. The only
difference is the syntax, nothing else has changed. 

CreateObject("component","my.cfc.path").init(datasource,settings); 

CreateObject("component","my.cfc.path").init(argumentCollection=args); 

<cfinvoke component="#obj#" method="init" argumentCollection="#args#" />

<cfinvoke component="#obj#" method="init">
<cfinvokeargument name="datasource" value="#datasourceObject#" />
<cfinvokeargument name="settings" value="#settingsObject#" />
</cfinvoke>

And to make it even weirder, it's always the SECOND argument, regardless
of what the argument is. So if I reverse the order and have settings as
the first argument and datasouce as the second argument, then the error
message changes to: 

"the DATASOURCE parameter to
the init function is required but was not passed in"

Has anyone else seen anything like this? 

Both arguments are objects and neither of them are being created as null
values -- I know this both because changing the order of the arguments
changes the error and because the one syntax option at the top does work. 

Of course I've restarted my CF instance several times among other things.
In case it might be important, I'm using CF 8.0.1 developer edition
stand-alone with the default JRun instance on Windows XP Pro (sp
whatever) with Apache 2.

Thanks,


-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 781.769.0723

http://onTap.riaforge.org/blog



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314377
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to