Display Object table returning nil after storyboard scene change.

Hey guys!,

Having some problems with a transition between scenes/storyboard via a Tab Bar.

some pseudo code below.

main.lua
loadimages() fires which populates a lua table with the image objects and their visibility set to false i’ll call this images{}. This is a pre loader kinda thing.
go to menu.lua

menu.lua
tabbar() with three options.

first option (default option from tab bar “loads first”)
make items in images{} visible and add them to display group.

second option
listview.lua

third option
info.lua
My issue is during the tab bar transitions. When I first load in everything ( App start) all is good however if I go to the second option on the tab bar (loads in a scene with a list view) and then back to the first option (the one with the images{} table) i get the “bad argument #-2 to ‘insert’ (Proxy expected, got nil)” error when im going to insert my items into the recreated display group. So it appears that I am loosing my display objects in the table or that somehow the pointer/reference to them is getting axed? I messed around with the proxy.lua stuff to see if I could get that to work but seems that it causes even the first entry into the “first option” fail with “bad arguement #-2 to ‘insert’ (Proxy expected, got nil)”

Any thoughts?

If i print the table info for any of the displayObjects in images{} ( images.image1) i get the same table memory reference so it looks like its there? But im not sure if its been modified or some LUA behavior with tables that im not aware of?

Thanks! [import]uid: 128768 topic_id: 32446 reply_id: 332446[/import]

wanted to also add. I noticed that the scene “first option” always works aka the one that is loaded via tab bar as the default. If it try and insert an image on “third option” of the tab bar I get the same proxy warning.

So I am beginning to think this table I have really does lose its objects. [import]uid: 128768 topic_id: 32446 reply_id: 129014[/import]

have you disabled the auto purge [import]uid: 7911 topic_id: 32446 reply_id: 129016[/import]

@jstrahan: no I hadn’t but no dice. still giving me the same problem. after setting “storyboard.disableAutoPurge = true” I get the same issue. [import]uid: 128768 topic_id: 32446 reply_id: 129018[/import]

actually NM. yes! I think that did it. I had to restart cider. I think sometimes Cider and Corona Simulator hold onto old code even if the simulator has been reloaded.
So with this off now I will need to manage my disposals carefully/memory management. Anything else that I will need to watch out for? [import]uid: 128768 topic_id: 32446 reply_id: 129020[/import]

wanted to also add. I noticed that the scene “first option” always works aka the one that is loaded via tab bar as the default. If it try and insert an image on “third option” of the tab bar I get the same proxy warning.

So I am beginning to think this table I have really does lose its objects. [import]uid: 128768 topic_id: 32446 reply_id: 129014[/import]

have you disabled the auto purge [import]uid: 7911 topic_id: 32446 reply_id: 129016[/import]

@jstrahan: no I hadn’t but no dice. still giving me the same problem. after setting “storyboard.disableAutoPurge = true” I get the same issue. [import]uid: 128768 topic_id: 32446 reply_id: 129018[/import]

actually NM. yes! I think that did it. I had to restart cider. I think sometimes Cider and Corona Simulator hold onto old code even if the simulator has been reloaded.
So with this off now I will need to manage my disposals carefully/memory management. Anything else that I will need to watch out for? [import]uid: 128768 topic_id: 32446 reply_id: 129020[/import]