Realize the visuals before fire listeners in Object:create() lime-object.lua ?

In lime-object.lua in Object:create(), the object and property listeners are fired before the actual display-objects are created, which results in the fact that the handlers cannot work with the actual object.sprite. The original code reads:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- Creates the visual debug representation of the Object.
function Object:create()
 
        self.map:fireObjectListener(self)
                
        for key, value in pairs(self.properties) do
                self.map:firePropertyListener(self.properties[key], "object", self)
        end
 
        -- If an object has a GID then it is one of the new TileObjects brought into Tiled version 0.6.0
        if self:hasProperty("gid") then
        ...
        end
end

Whoops, silly mistake there by me. Sorry about the issues that caused and thanks for the fix!

views:1518 update:2011/10/13 16:39:51
corona forums © 2003-2011