Latest Release: Corona Editor 1.6

I’m preparing Corona Editor 1.6.1 which will fix these issues:

  1.  Rows and columns in the current tab are no longer reset when using Super+F10 unless they were created by the Corona Editor Debugger (a corollary of this is if you create your own rows and columns the Debugger can’t create its own and its functionality will be reduced)

  2.  All errors and warnings in the build panel should be clickable.  If you find this is not the case, paste the error you are having trouble with here so I can use it to debug the issue

  3.  A new setting “corona_sdk_simulator_show_console” has been added, which, if set to true, will cause the Corona Simulator Console to be shown when running a project with Super+F10

Variable inspector is not doing anything for me with tables

It’s working for me:

(I selected “mouseTo”, right clicked and picked “Inspect Variable”)

Anything about your situation that might be novel?  I’m assuming “no doing anything” means nothing happens at all when you run the command.

Hmm you’re right, it seems to work fine for me in most cases. I haven’t been able to figure out why it doesn’t work in this case:

[lua]

function scene.loadCharacters()

    composer.bugs = {}

    composer.bugs[1] = composer.bugTypes[1].new()

    composer.bugs[1].path = BezierCurve.newPath()

    composer.bugs[1].state.timeScale = 1

    local p = composer.bugs[1]

    p.test = “hi”

end

[/lua]

In this case, I can’t inspect composer, composer.bugs, or p:

Locals:

BezierCurve = (table) {“new”:"<function>",“newPath”:"<function>"}

p = (table) [raw] table: 0x7fc14f16b6e0

composer = (table) [raw] table: 0x7fc14b1a0a90

Interesting… 

What happens if you add these lines after line 9 in the code above:

local json = require('json') print("composer: ", json.encode(composer)) print("p: ", json.encode(p))

I’m looking for the console output of the print()s or any error messages

Errors out on the print composer line: 

ERROR: Runtime error

type ‘table’ is not supported as a key by JSON.

What is a raw table?

“[raw]” means the debugger tried to display the value with json but failed.

What is “composer” in your app?  I can display the attributes of the “composer” object in the Interface/Composer sample without issue.

Hmmm … so apparently this is valid Lua (it only fails on the last line because json yields the “type ‘table’ is not supported as a key by JSON” error):

local json = require("json") local myTable = {} myTable['first'] = "number\_one" local myObject = {} myObject[myTable] = myTable print("myObject[myTable]: ", myObject[myTable]) print("myTable: ", json.encode(myTable)) print("myObject: ", json.encode(myObject))

Unfortunately the debugger can’t display values for objects that use tables as indices.

Interestingly this is almost the same and works just fine (and makes more sense to me):

local json = require("json") local myTable = {} myTable['first'] = "number\_one" local myObject = {} myObject.myTable = myTable myObject.myTable.second = "number\_two" print("myObject[myTable]: ", myObject[myTable]) print("myTable: ", json.encode(myTable)) print("myObject: ", json.encode(myObject))

Composer is what you’d expect: local composer    = require( “composer” )

I’m guessing that a module I’m using (probably Spine) is using tables as indices somewhere, and I’m am referencing objects made with that module from composer (e.g., composer.bugs)

It’s not a big deal for me as I just whip out Glider when I need to do some serious debugging.