Re: Writing Plugins in Pure Lua

I have no idea how to add a comment to this blog post:

https://coronalabs.com/blog/2015/05/22/writing-plugins-in-pure-lua/

Either I am to stupid to find this functionality, or it does not exist.

I am not certain I understand the last bit “Useful for personal/private development too” correctly. How would I add an unpublished Lua plugin to my project?

We encourage blog comments to be posted here in the forums. 

Pure Lua plugins at their heart are just Lua modules that your app can use. If you want to distribute them as a plugin, then we ask for a certain directory structure.

Create a folder named “plugin” in the project along side your main.lua. Then drop your module into the plugin folder. You can then simply do:

local myplugin = require( “plugin.yourmodule” )

Rob

Thanks, Rob. I followed your advice. It works, but I am getting the following warning:

WARNING: plugin.myplugin is not configured in build.settings

                    stack traceback:

                    main.lua:1: in main chunk

Is there any way I can remove/hide those?

Have you followed this tutorial?

https://coronalabs.com/blog/2015/06/23/tutorial-building-a-pure-lua-plugin-for-corona/

Rob

No, I haven’t. Let me have a look. Thanks, Rob! Also, for the future, how can I add a comment to a blog post?

We would like those comments to be made here in the forums. 

Rob

So is there a dedicated thread for each blog entry?

For Forum posts made since April or so, yes there is. It’s in the Announcements forum. For older posts, just start a new thread.

Awesome, thanks again! Maybe it would be more intuitive if the “Join us in the forums” link below each blog post would link directly to the thread, rather than the forum’s home page.

Rob, I followed the tutorial you linked. The warnings I am getting are still there:

WARNING: plugin.myplugin is not configured in build.settings

                   stack traceback:

                   main.lua:2: in main chunk

I get one warning for every plugin I have written. I assume these warnings are triggered b/c they are not “real” published plugins yet, but rather - as you advised - compiled Lua modules in a plugin folder within my application. Is there any way I can deactivate those warnings? They are cluttering my logs and quite distracting.

Is the plugin working?

We encourage blog comments to be posted here in the forums. 

Pure Lua plugins at their heart are just Lua modules that your app can use. If you want to distribute them as a plugin, then we ask for a certain directory structure.

Create a folder named “plugin” in the project along side your main.lua. Then drop your module into the plugin folder. You can then simply do:

local myplugin = require( “plugin.yourmodule” )

Rob

Thanks, Rob. I followed your advice. It works, but I am getting the following warning:

WARNING: plugin.myplugin is not configured in build.settings

                    stack traceback:

                    main.lua:1: in main chunk

Is there any way I can remove/hide those?

Have you followed this tutorial?

https://coronalabs.com/blog/2015/06/23/tutorial-building-a-pure-lua-plugin-for-corona/

Rob

No, I haven’t. Let me have a look. Thanks, Rob! Also, for the future, how can I add a comment to a blog post?

We would like those comments to be made here in the forums. 

Rob

So is there a dedicated thread for each blog entry?

For Forum posts made since April or so, yes there is. It’s in the Announcements forum. For older posts, just start a new thread.

Awesome, thanks again! Maybe it would be more intuitive if the “Join us in the forums” link below each blog post would link directly to the thread, rather than the forum’s home page.

Rob, I followed the tutorial you linked. The warnings I am getting are still there:

WARNING: plugin.myplugin is not configured in build.settings

                   stack traceback:

                   main.lua:2: in main chunk

I get one warning for every plugin I have written. I assume these warnings are triggered b/c they are not “real” published plugins yet, but rather - as you advised - compiled Lua modules in a plugin folder within my application. Is there any way I can deactivate those warnings? They are cluttering my logs and quite distracting.