That worked in the sense that it's now a structure and the cfc works and
the test cfinvoke and cfdump works, but no data in the .swf, but that's
certainly progress in the right direction.

I guess now it's down to my remote object call because the rest of my
code is exactly the same as the demo (I even pared it down to just the
getData (read) function)...

<mx:RemoteObject id="ro"  destination="ColdFusion" showBusyCursor="true"
source="el_cfcs.accounts">

If the cfc resides here:
C:\Inetpub\wwwroot\evidencelocker\el_cfcs\accounts.cfc
should the source = 'evidencelocker.el_cfcs.accounts' if the swf itself
is in
C:\Inetpub\wwwroot\evidencelocker\
?

Do I need an endpoint in RemoteObject tag? If so, should it contain the
protocol http://[IP address] and that's it, even if the app is one folder
down (evidencelocker)?

Thanks Brad.

(I feel like it's so close.)

  ----- Original Message -----
  From: "Brad Bueche"
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] In Flex and Coldfusion Crud in 100 lines,
  the CFC syntax doesn't work on MX702
  Date: Wed, 8 Apr 2009 17:11:40 -0400



  In my example I have:

  <cfcomponent output="false">
  <cffunction name="getData" access="remote" returntype="query"
  output="false">
  <cfargument name="keywords" type="string" required="false" />

  <cfset var local = structNew() />

  then ...<cfquery ....


  brad

  On Wed, Apr 8, 2009 at 4:51 PM, dmkramerica <kramer.da...@consultant.com>
  wrote:



    Hey guys,

    I followed this seemingly great article, and I've found that in
    the Crud.cfc portion of the example (here specifically)...

    1:<cfcomponent output="false">
    2: <cffunction name="getData" access="remote" returntype="Query">
    3: <cfset var local = {} />
    <cfquery name="local.q" datasource="mstest">
    select id, name, type
    from test
    </cfquery>
    <cfreturn local.q/>
    </cffunction>

    ...the 3rd line cfset var local = {} throws this error:
    "Invalid token '{' found on line 3"

    Is this a CF8 v CFMX702 thing? If so, what is the solution?

    If I comment out the line and remove the 'local' prefix to the
    query name 'q', the cfc runs fine, and a test.cfml that invokes
    the cfc works fine, but the swf never gets data. (I added
    crossdomain.xml with allow "*")

    I'm thinking two things
    1) the query result needs a collection wrapper for Flex to work?
    And
    2) that I might have a minor have endpoint and/or source
    description problem in the mxml for the remote object because I'm
    a tad unclear which "root" is being referred to web root, app
    root.

    Thoughts/help?

    Please and thank you.

    Dov


  



David Kramer, CISSP
davidkra...@consultant.com
480.710.1398
www.securepatterns.com

Reply via email to