Funny, before I just added the includes folder of the SDK and the gamekit.mm. For the device, it worked. For the simulator not. Now I created a new player project, but there I created a new group called plugins like you did and added the files there. Voila, it worked on the device AND the simulator. I have no clue what is different now but it works. Sorry for causing extra work for you.
If you downloaded and installed beta7 from http://88.198.22.6/downloads/beta , there is a Plugins folder at the installation folder. You put or remove plugins there and they are automatically loaded when player starts.
On iOS side, things are different. iOS doesn't support loading of dynamic libraries (I would be really glad if so). Therefore, you need to put the plugin into the XCode project by yourself and deploy the player again.
Atilim, as you know, I am working on a plugin atm. What I noticed is the following. In the simulator, the internal objects are removed and the scripts stop once you hit the stop button in the IDE. But objects that are created through a plugin still exist because the player is running. Do you have an idea how this (stopping the script) could be detected inside a plugin?
To convert a boolean from Lua to C (or ObjC), there is a function lua_toboolean(lua_State*). On the other hand, you should have a basic knowledge on Lua C API and Lua stack. Here is a great information about Lua C API: http://www.lua.org/pil/index.html#P4 Also, Lua C API is really fun to play with (I think )
For g_deinitializePlugin function, for example, there a BitOp example in plugins. In bit_stub.cpp, there is an empty g_deinitializePlugin which is called when the user press the stop button.
Thanks, that reminded me that I should use the FindInFiles functionality of my own editor more. And thanks for the link. Won't bother you with LUA questions anymore.
Btw., do you have a link that shows how to implement the class approach Gideros is using? Or is it shown in the samples plugins too and just didn't understand it. After all it would be better when plugins follow the methology of Gideros.
I would like to do something like this:
require"uikit"
myView = uikit.createView()-- Or myView = New View()
myButton = uikit.createButton()-- Or myButton = New Button()
myView:add(myButton)
myButton:setPos(30,200)
And how does Studio know these new commands? Via a plugin in the plugin folder?
If it's ok you, let me create a skeleton UI plugin with comments in it. Your Lua code can be a great start about how this plugin will look like. What do you think?
Any help is appreciated. I just want to make my plugin consistant with the way Gideros is doing it's other classes. Please take your time. I know you guys are now fully working on the book. And the IDE. And Gideros. And whatever
@atilim i found a way that the ide crash everytime...
1 open a project with some lua file in (Gidhelix is now more than 10 .lua files) 2 open another project that have less file in (ex. 1 or 2 .lua files) 3 crash...
the ide crash in my Macbook pro with lion os 10.7.2 and my MacPro (hack*ntosh) with lion 10.7.2.
hope it helps.
TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! - www.tntengine.com
I've installed a fresh lion 10.7.2 to my MacBook and this scenario crashes on my side too. We'll fix it. (On windows, linux (also with valgrind), and snow leopard, this scenario doesn't crash)
If it's ok you, let me create a skeleton UI plugin with comments in it.
I've been looking through the GameKit plugin, and have got the login alert showing from a gideros project, so I kind of see how it works. But I'd like to experiment with something more simple.
Comments
Now I created a new player project, but there I created a new group called plugins like you did and added the files there. Voila, it worked on the device AND the simulator. I have no clue what is different now but it works.
Sorry for causing extra work for you.
http://bit.ly/sImkxy
http://bit.ly/ruvi3H
Need to figure out how to interface with it. Means how to close it again, etc etc.
It is really interesting this UIKit stuff.
Likes: atilim
wow!!! cool!!!
www.tntengine.com
On iOS side, things are different. iOS doesn't support loading of dynamic libraries (I would be really glad if so). Therefore, you need to put the plugin into the XCode project by yourself and deploy the player again.
Do you have an idea how this (stopping the script) could be detected inside a plugin?
Another question. How can I parse and convert a boolean from LUA to ObjC?
For g_deinitializePlugin function, for example, there a BitOp example in plugins. In bit_stub.cpp, there is an empty g_deinitializePlugin which is called when the user press the stop button.
And thanks for the link. Won't bother you with LUA questions anymore.
Btw., do you have a link that shows how to implement the class approach Gideros is using? Or is it shown in the samples plugins too and just didn't understand it.
After all it would be better when plugins follow the methology of Gideros.
I would like to do something like this:
Best wishes
Michael
i found a way that the ide crash everytime...
1 open a project with some lua file in (Gidhelix is now more than 10 .lua files)
2 open another project that have less file in (ex. 1 or 2 .lua files)
3 crash...
the ide crash in my Macbook pro with lion os 10.7.2 and my MacPro (hack*ntosh) with lion 10.7.2.
hope it helps.
www.tntengine.com
Thank you
Likes: chipster123
Do you have a simple plugin example, please?
Likes: gorkem