Code Generated by Composer

(Copied from a random post on the site because this is the correct spot…)

In the scene1.lua file you’re using getObjectByTag() to determine whether an object is available, but what you’re looking at is named as ID. An ID is usually something that’s unique while multiple objects can be tagged with the same thing.

 

I’d suggest getObjectByTag() and getObjectById() in order to differentiate between the two.

 

getObjectByID() would only return a single item (the first match of “id” it finds - should only be one unless coder is lazy and reusing the same ID among objects).

 

getObjectByTag() would return a table holding all matching “tag” items. If only one is found it’s the 1st element of that table.

 

 Jay

 

(Copied from a random post on the site because this is the correct spot…)

I don’t see any way to add properties to an object in Composer at this point, although that would be handy. But even if the GUI doesn’t allow that it would be nice if Corona would allow properties in the JSON code that’s generated.

By allowing multiple properties to be attached to the objects you allow 3rd parties to make tools that can work in conjunction with Corona Composer. More tools = better for everyone.

 

My first thought is that any JSON key that’s not “known” by Corona should be added as a property of that object. But if that’s too “wide open” then how about a JSON key like props or params – a table that allows multiple property key/values. The object could then add that single property, which could be accessed like: obj.params.foo

 

Although I think a case could be made to split the params out and add them all as “root” properties so you’d have obj.foo available.

 

 Jay

I think that this is a great tool to include with the SDK package (Pro and up) for free as an alternative to LevelHelper etc. but I do believe that it needs many more features to make the effort worth it. I think that the abilities to add custom properties; types with their own properties built-in; perhaps some type of function editing; multiple scene management; etc. would be awesome.

Hopefully it becomes a bit more robust through beta and I can’t wait for the Windows version. It makes sense for Pro and above for free and especially as a tool for Windows users!

John

(Copied from a random post on the site because this is the correct spot…)

I don’t see any way to add properties to an object in Composer at this point, although that would be handy. But even if the GUI doesn’t allow that it would be nice if Corona would allow properties in the JSON code that’s generated.

By allowing multiple properties to be attached to the objects you allow 3rd parties to make tools that can work in conjunction with Corona Composer. More tools = better for everyone.

 

My first thought is that any JSON key that’s not “known” by Corona should be added as a property of that object. But if that’s too “wide open” then how about a JSON key like props or params – a table that allows multiple property key/values. The object could then add that single property, which could be accessed like: obj.params.foo

 

Although I think a case could be made to split the params out and add them all as “root” properties so you’d have obj.foo available.

 

 Jay

I think that this is a great tool to include with the SDK package (Pro and up) for free as an alternative to LevelHelper etc. but I do believe that it needs many more features to make the effort worth it. I think that the abilities to add custom properties; types with their own properties built-in; perhaps some type of function editing; multiple scene management; etc. would be awesome.

Hopefully it becomes a bit more robust through beta and I can’t wait for the Windows version. It makes sense for Pro and above for free and especially as a tool for Windows users!

John