Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing values returned by one cffunction to another.

Status
Not open for further replies.

countdrak

Programmer
Jun 20, 2003
358
US
Ok I am trying to pass a string returned by another cffunction to a cffunction, and I keep getting an error-

You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members.

Here is my code -

Code:
<cfinvoke component="components.menu" method="GetTree" returnvariable="XString">
</cfinvoke>

I am trying to pass XString to another function. Which is a simple string. All this code is in the same component file.This is my ohter function call

Code:
<cfinvoke component="components.dmenu" method="WritetoFile">
<cfinvokeargument name="XToWrite"  [red]value="XString"[/red]>
</cfinvoke>

How do I pass one value returned by one function to another function?
 
What sort is xString?

If its an array or a query or the like, that would explain the error.

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
I read it completely backwards..

have you tried...

value="#xString#"

And for stupid question #2.. Are you sure this is the line the error is occurring on? I'm sure you checked that, but its one of those things... An error could apply to the line you think the problem is in, but it is really for a whole different line..

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Ok value="#xString#" worked. Thanks a lot. One another problem, I hadn't referenced it as #Arguments.XToWrite# in my WritetoFile function. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top