Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

TableView Rows - Add an Image
Started by autolib Apr 20 2013 05:31 AM

26 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

primoz.cerar

[GLOBAL: userInfoPane.html]
primoz.cerar
  • Starter
  • PipPipPipPipPipPip
  • 443 posts
  • Jedi

Ok then yes you need those referenced HOWEVER as you saw, the tableView will remove your objects when the row goes out of view so you will have a problem knowing whether your button for example still exists. If you try to change anything on it and it has been removed you will get an error. It's undocumented but you can check if a rows view currently exists or not like this:

 

if tableView._view._rows[index]._view then

  --rows view exists so your button should too

else

  --rows view doesn't exist so you don't have to change anything, but make sure you set the values you want in the onRowRender if the row comes back in to view.

end



[TOPIC: post.html]
#27

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Pro
  • PipPipPipPipPipPip
  • 2,229 posts
  • Jedi

Thank you, @primoz.cerar.  That's really helpful.  I'll keep the code snippet.

 

Thanks again!

 

Naomi




[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]