Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Important: addChildAt function is changed at 2012.08.2 — Gideros Forum

Important: addChildAt function is changed at 2012.08.2

atilimatilim Maintainer
edited September 2012 in General questions
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_1

With 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.
+1 -1 (+3 / -0 )Share on Facebook

Comments

Sign In or Register to comment.