Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Darryl A. J. Staflund #1
CreateObject / var Incompatibility
Hi all,
I am developing some CFCs at the moment and have found that if I try to invoke
a CFC using the following syntax from within a UDF:
<cffunction name="etc">
<cfset var obj = CreateObject ("Component", "componentName") />
</cffunction>
I get a 'Missing Argument Name' when executing the function. In order to
address this issue, I have to create the var and CreateObject apart as follows:
<cffunction name="etc">
<cfset var obj = "" />
<cfset obj = CreateObject ("Component", "componentName") />
</cffunction>
Is there something I am doing wrong with my code, or is this behaviour by
design? I am guessing that the 'var' somehow masks the name of the object from
the CreateObject function thereby causing the exception, but I am not sure why
this would be a problem.
Thanks,
Darryl
Darryl A. J. Staflund Guest
-
firefox incompatibility
Hi, i have dreamwevaer MX and have made a webpage with a jump menu. the menu works fine in IE but doesnt in firefox. please help? Thanks -
#39372 [NEW]: Incompatibility in the PHP API.
From: cm at cmunt dot demon dot co dot uk Operating system: All PHP version: 5.2.0 PHP Bug Type: *Compile Issues Bug... -
server incompatibility
I recommended Contribute to one of my clients and his web hosting company says: " I do not think Contribute works with our server software. We had... -
Incompatibility between Dir 8.5.1. and Win 98 SE ?
Hi all, I posted another message lately about autolaunch and an issue with Dir 8.5.1. In the meantime, I did the following test : I copied... -
INCOMPATIBILITY BETWEEN WIN XP PRO AND LEXMARK Z53
Since only one person (Tom) responded to the below problem, I decided to reverse the process. I now have the Lexmark Z53 as a local with the WIN ME... -
Stressed_Simon #2
Re: CreateObject / var Incompatibility
Yeah you can only get away with setting simple values when var(ing) a function
only variables:-
ie var myString ="";
var myBoolean = False;
var mySturcture = StructNew();
It is important to var all your function only variables as this will save you
many hours of head scratching with funny errors when it gets complex.
Stressed_Simon Guest
-
PaulH #3
Re: CreateObject / var Incompatibility
i don't believe that's true (at least w/cf7). i create complex java objects
quite often using vars and i just tested this w/a CFC & it worked as expected.
perhaps it's something else?
<cffunction name="aUDF">
<cfset var z=createObject("component","cfc.i18ncurrency")>
<cfreturn z.getCurrencySymbol("th_TH")>
</cffunction>
<cfdump var="#aUDF()#">
PaulH Guest



Reply With Quote

