Where is the Runtime listener in the stack?

Trying to locate a Runtime listener

Im doing this:

– main file:

for k, v in pairs( Runtime ) do print( k ) end    – Here, I have tried many different directories but I can’t find it

–and in a storyboard scene I do this in the enterFrame function:

Runtime:addEventListener( “enterFrame”, function() end )

What are you trying to do?

(It’s possible to find it under the Runtime object however keep in mind it’s a private API which can change without notice and *will* break your app at some point in time)

If you need a reference to your function why not declare it first?

local onEnterFrame = function(event) --do something end Runtime:addEventListener("enterFrame", onEnterFrame);

I know, but the question came up while bug checking my game. I wanted to track a Runtime enterFrame listener (well, just for quriosity

I know, but the question came up while bug checking my game. I wanted to track a Runtime enterFrame listener (well, just for curiosity really), I started to track all my objects in the Runtime environment on each enterFrame and exitFrame events, after and before transitions (I use storyboard in this project) so when I do:

[lua]

for k, v in pairs(Runtime._functionListeners) do
   print(  k, v )
 end

[/lua]

I get the enterFrame as the key and I get the table name (i.e 0x10c02d460) as the value

this name is the same as long as this particular table exist so between the adding and removing of Runtime objects I can tell which of them that is potentially bugging me :slight_smile:

What are you trying to do?

(It’s possible to find it under the Runtime object however keep in mind it’s a private API which can change without notice and *will* break your app at some point in time)

If you need a reference to your function why not declare it first?

local onEnterFrame = function(event) --do something end Runtime:addEventListener("enterFrame", onEnterFrame);

I know, but the question came up while bug checking my game. I wanted to track a Runtime enterFrame listener (well, just for quriosity

I know, but the question came up while bug checking my game. I wanted to track a Runtime enterFrame listener (well, just for curiosity really), I started to track all my objects in the Runtime environment on each enterFrame and exitFrame events, after and before transitions (I use storyboard in this project) so when I do:

[lua]

for k, v in pairs(Runtime._functionListeners) do
   print(  k, v )
 end

[/lua]

I get the enterFrame as the key and I get the table name (i.e 0x10c02d460) as the value

this name is the same as long as this particular table exist so between the adding and removing of Runtime objects I can tell which of them that is potentially bugging me :slight_smile: