Database/sendResponse problem

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
Kenn
Posts: 9
Joined: 03 Apr 2009, 12:25

Database/sendResponse problem

Post by Kenn »

Hello!

Ive been playing around with the internalDbExample.fla files, trying to understand it. I managed to understand most of it, and altered it to fit my needs.

Problem is i dont really understand how to read the values that i send back to the client. Putting the values into the datagrid component as in the tutorial is no problem, but i just cant figure how to use the response object for anything else..

To put it short, how do i trace the content of the response? :oops:


Cheers!
Kenn
Posts: 9
Joined: 03 Apr 2009, 12:25

Post by Kenn »

I must be stupid, but i really cant get this to work :/ ..

trace(o._cmd); works fine, traces the current value, however trace(o.list); returns nothing (" "), but it populates the datagrid component with the corrent values..

Surely there must be some way to use the data outside the datagrid component?
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

o.list would output nothing because it's an object.

do this

for (var i in o.list)
{
trace(i ": " + o.list);
}

then to access these values, use o.list["name"] or o.list.name
Smartfox's forum is my daily newspaper.
Kenn
Posts: 9
Joined: 03 Apr 2009, 12:25

Post by Kenn »

Thanks for the reply! Sadly it gives me the exact same thing, only now it gives me the right amount of rows.

output:
0:
1:
2:
3:
This is really confusing :/ ..
Kenn
Posts: 9
Joined: 03 Apr 2009, 12:25

Post by Kenn »

Aha, found the problem, the column name had to be in caps..

trace("Name: "+o.list[0].NAME) instead of trace("Name: "+o.list[0].name)
Post Reply