-
1. Re: You have attempted to dereference a scalar variable of type class java.lang.String as a structure wi
Fernis Mar 25, 2010 3:25 PM (in response to daveioi)1. Are you using cftry/catch in our component? In some CF verison (at least), var scoped variables couldn't be referenced in cfcatch block.
2. What is your function returning? Is it a structure? Try removing the returntype attribute of the function.
3. Double check for overlapping variable names - try to change your variable names in the function and check if that helps.
And P.S. <cfset stagecol.colour1="#oncolour#"> is better and clearer written as <cfset stagecol.colour1 = oncolour>
Never use pound signs until you're outputting something, or dynamically evaluating a variable name.
-Fernis
-
2. Re: You have attempted to dereference a scalar variable of type class java.lang.String as a structure wi
Adam Cameron. Mar 25, 2010 3:55 PM (in response to daveioi)<cfset var stagecol="StructNew()">
Look more closely at that line of code.
What's wrong with it?
--
Adam
-
3. Re: You have attempted to dereference a scalar variable of type class java.lang.String as a structure wi
Fernis Mar 25, 2010 10:40 PM (in response to Adam Cameron.)<cfset var stagecol="StructNew()">
Those cannot be seen by the human eye!
...Which is exactly why the habit of using extra "#quotes#" is shooting oneself in the leg.
-Fernis
-
4. Re: You have attempted to dereference a scalar variable of type class java.lang.String as a structure wi
daveioi Mar 26, 2010 10:15 AM (in response to Fernis)Thank you both so much for your help and "I promise I'll never do that again"........
Best wishes
Dave
-
5. Re: You have attempted to dereference a scalar variable of type class java.lang.String as a structure wi
Adam Cameron. Mar 26, 2010 10:34 AM (in response to daveioi)No worries mate. We've all done it.
--
Adam


