Scott,

 

Hopefully there is some Flash / Coldfusion / Remoting veterans in here to help you J  Hoping this isn’t a new issue, I will google some to see if there is anything out there, but there may also be someone in this group who has solved this issue before.  I will see what I can do, but this is pretty far out of my expertise…  Hope someone can help you in the mean time.

 

Dustin Mercer

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Scott Langeberg
Sent: Wednesday, November 23, 2005 3:39 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] OT: 2D array from Remoting

 

Unfortunately, Flash doesn't appear to have that ArrayUtil class.

 

Here is the code, where coldfusion is calling the java object. I can call the same component from a different page (CFM) and get proper array from java, but is causing errors with Remoting, for some reason!

 

<cfcomponent displayname="TextShape">
 <!---
 * getCoordinateArray()
 --->
 <cffunction name="getCoordinateArray" access="remote" returntype="array">
  
  <cfargument name="layout" type="string" required="true">
  <cfargument name="font" type="string" required="true">
  <cfargument name="text" type="string" required="true">

  <cfset coordsArray = ArrayNew(2)>
  
  <cftry>    
   <cfscript>    
    textShape = CreateObject("java", "com.imagetrend.text.TextShape");
    textShape.init(arguments.layout , arguments.text, arguments.font);

    coordsArray = textShape.getCoordinateArray();
   </cfscript>       
   <cfcatch type = "Any">
    <cfset coordsArray[1][1] = "error=#cfcatch.message#">
    <cfset coordsArray[1][2] = "exceptiontype=#cfcatch.type#">     
   </cfcatch>   
  </cftry>
  
  <cfreturn coordsArray>
  
 </cffunction>

</cfcomponent>

 

Scott

On 11/23/05, Dustin Mercer <[EMAIL PROTECTED]> wrote:

That is what I was afraid of.  I haven't used Flash / Remoting, but I have done a ton with Flex (Not sure how much different the two are though).  In flex we have a class called mx.utils.ArrayUtil.  I am not sure if Flash has this same tool, but when we get arrays back from Java (remoting), we have to use the ArrayUtil.toArray(result) to get the compiler to play nice.  Maybe the same will apply here?  If not, hopefully this will give you a start J .

 

Dustin Mercer

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Scott Langeberg
Sent: Wednesday, November 23, 2005 2:28 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] OT: 2D array from Remoting

 

Yeah, Flash accessing the built-in remoting in Coldfusion MX 7.

 

Scott

 

On 11/23/05, Dustin Mercer < [EMAIL PROTECTED]> wrote:

Scott,

 

Are you using Flex or Flash.  You say Flash with remoting, but I have seen people refer to Flex the same way (Generalizing) J   Just want to make sure I understand the question properly

 

Dustin Mercer

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Scott Langeberg
Sent: Wednesday, November 23, 2005 1:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] OT: 2D array from Remoting

 

Sorry for the OT, but I haven't found anyone with the same problem and I'm losing hope.

 

I'm trying to return a 2D array from Coldfusion to Flash, via Remoting. However, I am getting the following error:

 

> Could not convert a value of type class [[I to an Array

 

The component works fine, as I called it from another CFM.

 

Thanks,

 

Scott




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com


SPONSORED LINKS

Web site design development

Computer software development

Software design and development

Macromedia flex

Software development best practice

 

 


YAHOO! GROUPS LINKS

 

 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



SPONSORED LINKS

Web site design development

Computer software development

Software design and development

Macromedia flex

Software development best practice

 

 


YAHOO! GROUPS LINKS

 

 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to