Ok I have been trying every which way to figure this out.
I need to get this table to be a global.. I have realized it is much less efficient to pass TableID around.. in the scope of my program.
So I tried creating a new table then looking it up:
TableID = ets:new(tb, [set,public]),
put({tableUniqueID}, TableID),
Then I used:
get({tableUniqueID})
And in the same function it returns TableID just fine... yet when I use it in another function, it returns an undefined.
What?? I thought get and put made a key global..
ALSO before all this I realized you "could" call a table lookup function as such:
ets:lookup(get({tableUniqueID}), msgIn)
Same thing, in function works, outside does not.. Get Put problem..
Then I realized another way to Lookup a table would be by calling the atom of the table
ets:lookup(tb, msgIn)
But this NEVER works, not inside the function, not out..
So my main priority would be to figure why looking up a table by its atom, is not possible. But it says it is most everywhere, including the manual.
The get/put I could live without, As long as I can store table, then lookup the table by its atom identifier.
Can anyone shed light on this dilemma.
Thanks, -B