Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

newTableView widget 2.0 --ListView2 example
Started by buzzard1447 Mar 05 2013 01:08 PM

3 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

buzzard1447

[GLOBAL: userInfoPane.html]
buzzard1447
  • Observer

  • 6 posts
  • Corona SDK

I was mid-stream development and decided to incorporate widgets 2.0. The changes in 2.0 require quite different coding and even though the Sample Code in "Interface/ListView2" illustrates how to make different row texts in the tableView, this example code doesn't really work. It shows creating a table with the different row texts that the loops supposedly inject into the rows but when you run ListView2 with the Corona Simulator, the rows are still only labeled with the basic display.newText of the other examples in ListView1 and ListView2. The table with the different meals and menu items does not display.

I have been trying to figure out how to duplicate my row texts (each row has different text) for a few days now while traveling but have been unsuccessful. If someone could explain how I can make ListView2 work as it is apparently intended, I should be able to figure this out. if anyone has a version of the code in ListView2 that actually works, I would sure appreciate a look at it. I have searched the forum and read all the blogs but it seems only the examples that show the same row text with different index numbers is all that is shown.

newTableView is assuredly a powerful widget that will be one of my favorites as soon as I understand how it works. I had the old one working just fine but this one is kicking my arse! Please help.

Thanks,
George
uid: 214528 topic_id: 36898 reply_id: 336898


[TOPIC: post.html]
#2

buzzard1447

[GLOBAL: userInfoPane.html]
buzzard1447
  • Observer

  • 6 posts
  • Corona SDK


Got this working but it's kind of a hack. I just used the display.newText statement in the onRowRender function to get each item out of the table indexed by the row.index. The bit of code down in the 2 nested FOR loops only calls the "insertRow (blank row as far as I can see..) then onRowRender and passes the rowHeight(also indexed out of a table for different sized rows). The insertRow method in the nested FOR loops only serves to make a row of a specific height, doesn't actually insert anything into the row as far as I can see. No need to have the bit of code for rowTitles or list items down in the Nested FOR loops as I could not get this to work.
uid: 214528 topic_id: 36898 reply_id: 145236


[TOPIC: post.html]
#3

buzzard1447

[GLOBAL: userInfoPane.html]
buzzard1447
  • Observer

  • 6 posts
  • Corona SDK

I was mid-stream development and decided to incorporate widgets 2.0. The changes in 2.0 require quite different coding and even though the Sample Code in "Interface/ListView2" illustrates how to make different row texts in the tableView, this example code doesn't really work. It shows creating a table with the different row texts that the loops supposedly inject into the rows but when you run ListView2 with the Corona Simulator, the rows are still only labeled with the basic display.newText of the other examples in ListView1 and ListView2. The table with the different meals and menu items does not display.

I have been trying to figure out how to duplicate my row texts (each row has different text) for a few days now while traveling but have been unsuccessful. If someone could explain how I can make ListView2 work as it is apparently intended, I should be able to figure this out. if anyone has a version of the code in ListView2 that actually works, I would sure appreciate a look at it. I have searched the forum and read all the blogs but it seems only the examples that show the same row text with different index numbers is all that is shown.

newTableView is assuredly a powerful widget that will be one of my favorites as soon as I understand how it works. I had the old one working just fine but this one is kicking my arse! Please help.

Thanks,
George
uid: 214528 topic_id: 36898 reply_id: 66898


[TOPIC: post.html]
#4

buzzard1447

[GLOBAL: userInfoPane.html]
buzzard1447
  • Observer

  • 6 posts
  • Corona SDK


Got this working but it's kind of a hack. I just used the display.newText statement in the onRowRender function to get each item out of the table indexed by the row.index. The bit of code down in the 2 nested FOR loops only calls the "insertRow (blank row as far as I can see..) then onRowRender and passes the rowHeight(also indexed out of a table for different sized rows). The insertRow method in the nested FOR loops only serves to make a row of a specific height, doesn't actually insert anything into the row as far as I can see. No need to have the bit of code for rowTitles or list items down in the Nested FOR loops as I could not get this to work.
uid: 214528 topic_id: 36898 reply_id: 145236



[topic_controls]
[/topic_controls]