02-10-2011 11:21 AM
I am a new developer to the AIR, ActionScipt and Flex world but very determined. I am trying to get my app finished before the March 15 deadline and I've hit a couple snags.
Mainly, List custom CellRendering and displaying websites in a container (not as important currently but will be after I get the skinning done).
I have done my searching and come across a couple great articles
These tutorials are great for giving example code snippets but I would like to download source code and load it into Flash Builder and then execute it on the simulator that way I can see the structure and flow of the code and better understand how to build my project. If anyone has an app that does some or all of the following things and they either have their app open source or don't mind sharing parts of their source that run on their own in the simulator that would be IDEAL and greatly appreciated.
I am building an app that interacts with a website and has the following functions:
- Submit data to the site via button clicks
- User login
- List articles by title, author and if there is a thumbnail display that in the list as well
- The items in the list when clicked load either text or webpages
But this thread I want to focus on building a List that has a custom CellRenderer that will give each cell, buttons that submit data, show pictures if they exist, titles and authors. For example, I have been developing a similar app for the webOS and this is what the list I am hoping to achieve looks like (some of you might know what website I'm talking about)
(The arrows are the buttons)
In summary, if anyone has source code, knows of source code, or can give me working projects that I can download and load into the simulator that demonstrates how to do the CellRendering where I can display something similar to the custom skins tutorial that would be awesome! If not could you point me in the right direction by giving me some references to other tutorials or even code snippets of how you would try to implement parts of it would also be helpful.
If I get my app to the point where I can pull off the 4 items above and submitted before March 15 I will open source my app to not only help development further but to be used as an example for anyone trying to build an app with a similar function for the PlayBook.
Thank you to anyone who replies!
02-10-2011 11:28 AM
It is best to submit a specific problem that can be addressed vs. asking for a full application with code that does what you are asking. There are numerous threads that covers making custom renderers for lists. In this specific case, you will need to:
So you will need to manage how data is accessed and managed. We can give advise, but we cannot make those decisions for you.
Give at shot form what is available, and then post if you get stuck.
02-10-2011 11:42 AM
The tutorial from Ryan Stewart that you posted should contain everything you need. He specifically adds two lines of text and an image, so that's covered in full. He doesn't explain adding a button to the cell renderer, but you add them just like anything else.
Ryan's method was the only one I was able to use that worked properly and consistently. Overriding drawLabel or draw from one of the included CellRenderers caused list refreshing issues while scrolling (data scrambled and items did not retain proper order). Also the List would only show half of my data, and repeated that half to fill the correct number of items.
02-10-2011 01:05 PM
Yes, I hope they (BB) resolve the QNX list and renderer issues. I have had to write a lot of code to get around the odd behavior and improper updates and refreshes that occurs. It is still not 100%, but I hope the final SDK will make the List behave as any one would expect. I dont know if it is bad design or bad implementation. Adobe Flex/AIR lists and renderers work just fine.