I like to maintain mixed case of returned variables from CFCs so that
they can directly map to how I have them named in AS/Flex.

The two techniques I've used (using CFMX 6.1) are naming struct keys
like mystruct["firstName"] and the like.  With queries you can
accomplish the same thing by using column aliases (at least with SQL
Server) like,

SELECT
employeeID AS 'employeeID',
firstName AS 'firstName',
lastName AS 'lastName'
FROM Personnel

Will preserve case in returned objects. The my AS code can read

var firstName:String = result[0].firstName;

OR

var firstName:String = result.firstName;

Jeff

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Abdul Qabiz
Sent: Friday, June 10, 2005 8:21 AM
To: [email protected]
Subject: RE: [flexcoders] Flex / Flash / FlashComm, Remoting and CF


Yeah, It is always a good idea to create unit tests for your CFC. As
Indy said, create a CFM page and call all CFC methods and check with
expected output...

This is a way to isolate your problems..

-abdul 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Indy Nagpal
Sent: Friday, June 10, 2005 3:55 AM
To: [email protected]
Subject: Re: [flexcoders] Flex / Flash / FlashComm, Remoting and CF

Yes...

I find that is always a good idea to have a cfm page that queries your
cfc exactly in the same manner as the remoteobject tag in your flex app
would. And use cfdump on your cfm page to examine what the cfc returns.
That way you know exactly what is being returned. And if you are using
structures and queries, be careful of the capitalization of structure
keys and query column names. Trust me, it saves a lot of time.

Indy

On 6/10/05, dave buhler <[EMAIL PROTECTED]> wrote:
>  Use all Uppers when you reference the remoting object.
>  
>  I assume you're returning a struct?
>  
>  If so:
>  
>  return tempstruct should work fine so long as you have
tempstruct.FIRSTNAME
> as the firstname variable name.
>  
>  If you are returning a query, you'll need to referece
result[0].FIRSTNAME,
> etc.
>  
>  
> 
> 
> On 6/9/05, Seth Voltz <[EMAIL PROTECTED]> wrote:
> > 
> > Hey everyone,
> > 
> > A while back someone posted an article on quirks when using Remoting

> > (and the flash gateway) with Flex / Flash and FlashComm. I can't
find
> > it anywhere (archive searches, google, etc.) Maybe I'm just not
hitting 
> > the right terms.
> > 
> > If anyone remembers it I'd most appreciate the link.
> > 
> > If not, here's the problem I'm having which I think that ink will
solve
> > (Off Topic):
> > 
> > I have an FCS app which hits a CF7 server's flash gateway looking
for a 
> > service. The services which return strings work just fine but
anything
> > that returns something more complex doesn't seem to work. I try 
> > "return.VAR", "return.var", "return.Var", etc. but it comes back 
> > undefined.
> > 
> > Thanks,
> >         Seth
> > 
> > 
> > 
> > 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
>  
>  ________________________________
>  Yahoo! Groups Links
>  
>  
> To visit your group on the web, go to: 
> http://groups.yahoo.com/group/flexcoders/
>   
> To unsubscribe from this group, send an email to: 
> [EMAIL PROTECTED]
>   
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to