Hi,
As you know,
@techdojo reported a bug about addChildAt function at this thread:
http://giderosmobile.com/forum/discussion/1553/documentation-bug-or-library-error#Item_1With version 2012.08.2, index parameter of addChildAt starts from 1. If you're using addChildAt function in your code, you have two options:
1. In your code, increase the index field of addChildAt functions by 1. (e.g. addChildAt(..., 0) should be addChildAt(..., 1)) This is the preferred way.
2. Put this function to init.lua
if application.getApiVersion ~= nil and application:getApiVersion() >= "2012.08.2" then
local originalAddChildAt = Sprite.addChildAt
function Sprite:addChildAt(child, index)
originalAddChildAt(self, child, index + 1)
end
end |
Thank you.
Comments
EDIT : Updated the code and tested it in 2012.8.2 - I can confirm the fix works and Sprite:addChildAt() works as intended.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Maybe it would be better I try it myself after get up
https://sites.google.com/site/xraystudiogame
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill