package.loaded related errors

Something that I am unable to get my head around, this was working perfectly fine…

if I use

require “a”
package.loaded.a --> should return either False or the table
Now what is happening is that when I try the package.loaded, I am getting a true or a false, which is not how the documentation states it is supposed to work.

any ideas on what I could be doing wrong?

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 16841 reply_id: 316841[/import]

What build are you using that returns “true”? I tried the following code in builds 591 and 640 on the Mac simulator and it’s working fine.

local ui = require("ui") print( package.loaded.ui ) --\> table: 0x170f83d0 [import]uid: 7559 topic_id: 16841 reply_id: 63169[/import]

Hi Tom,
Sorry this response got overfilled with so many other from the other threads.

I got that resolved, the issue was the silly thing that was being discussed and I tried, I omitted the module(…, package.seeall)

therefore it became just True/False where as upon adding that, it became the correct table form.

In the last two days because of the errors, that I was faced with, I learned so much more about LUA, Apple and Corona…

we learn better when things do not work…

Thanks and cheers,

?:slight_smile: [import]uid: 3826 topic_id: 16841 reply_id: 63538[/import]