Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Correctly Deleting Tableview Contents
Started by lessmsios Mar 12 2013 05:20 PM

2 replies to this topic
tableview deleting
[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

lessmsios

[GLOBAL: userInfoPane.html]
lessmsios
  • Contributor

  • 171 posts
  • Corona SDK

I'm using the latest TableView widget and have multiple categories and rows. The rows each have an image (display.newImageRect) and text (display.newText) and it all works fine.

 

How would I properly delete everything in the TableView before deleting the TableView itself? I am assuming that "deleteAllRows()" will not properly delete the display items added to the row - or am I wrong?



[TOPIC: post.html]
#2

Danny

[GLOBAL: userInfoPane.html]
Danny
  • Corona Geek

  • 2,597 posts
  • Corona Staff

Hi. May i ask why you want to remove the content before removing the tableView itself? Removing the tableview will also remove any content inserted into it (including any content inserted into its rows)

[TOPIC: post.html]
#3

lessmsios

[GLOBAL: userInfoPane.html]
lessmsios
  • Contributor

  • 171 posts
  • Corona SDK

@Danny - So you're saying that if I just do:

 

tableView:removeSelf();

tableView = nil;

 

This will remove all display objects that have been inserted into rows AND free the memory AND any references to those display objects?

 

David




[topic_controls]
[/topic_controls]