So I posted the question about passing table info in the Corona forum again yesterday. I had done it twice before and received no response, maybe I didn’t word it correctly, or just the timing, hard to tell. But this time I got a couple great responses. Mpappas gave me a hint but Spradeep1979 went into extremely helpful detail.

One of the things I didn’t do was go back an relook at the information and docs – which I I should have figured they were updated, but I just blew it. Anyway – the docs, as Spradeep1979 pointed out and demoed – showed good ways to just what I needed.

Also – back when Corona first added scenes and storyboards there was some talk on using to store global style variables (rather than use – which is not a good idea because you could step on the Corona globals) and had been using that. The new articles, again pointed out by Spradeep1979, suggest a method of use a lua page with this:

local M = {}
— then in here you put your vars, for example:
M.addButtonX = 30 — I make the x/y’s of repeated graphics in one place, easier update

M.addButtonY = 70
… and so on
return M

Save this to a lua page called myData.lua. Then in storyboard program put:

local myData = require(“mydata”)

that way anywhere you need one of the vars you can do:

byButton.x = myData.addButtonX

Probably something I picked up when implementing the UCSD P system on a couple OS’s, but I like the idea of putting and defining as many vars in one place, then only updating them in one place. A good tidyness habit.

I’ve updated the MyTest database test to include both the new way of passing information and the myData.lua as the “global” variables.


leon …