shouldnt it be selectedItem (first s is lowercase)
also, dont you want to send the whole item to the next view, not just the name property?
To send the whole data, just use "list.selectedItem".
The error you see is because you have an event specified in MXML and none as parameter for the handing function.
Remove the "event" in the List change handler
- OR -
Add this to the function:
That error is gone now but now I have another problem: instead of getting the trends name in the trends list, I get a list of [b][Object Trend][/b].
Also, after I click a trend, I have to click the refresh button to show all the tweets. What can I make so that the tweets would be shown directly?
For the first you need to set the labelField property on the list to the name of the trends property. I don't know the name (it could just be "name"), you can use the debugger to inspect the data and find the name.
To populate the list create a creationComplete hander on the View and call the same code you are calling in the Refresh button click handler.
Can you be more specific? I am a beginner so I don't know exactly what you mean. I found that labelField propery on the list has the text name, but I don't know the trends' one.
I tried [b]creationComplete="getTweets()"[/b] and it does not work of course. Where's the error?
Is this the Twitter Trends application from the Adobe Devnet?
If not, can you post more code please? I need to see it to be able to answer specific questions.
It is the twitter trends application.
Hm, well following the steps there should lead you to the answer.
I looked up the labelField one in the source files provided in the lesson and it's "name".
I modified it, and I still get [Object Trend] in the trend list.
If you are working in TwitterTrendsHomeView.mxml, then you did something wrong when you set-up the Data Wizard.
Why not go over the steps of that lesson again? If I remember right, it also shows how to use the debugger and this is what you need for your problem now.
Using the Debugger is important, you'll use it in real projects as well.