spriteDog.isPaused = false; Where's "isPaused" ?

Hi, I’m new in Lua.
I’m reading the code in HelloLua. I saw “spriteDog.isPaused = false”.
But what keeps confusing me is that now that there’s no attribute “isPaused” in CCSprite, where is this “isPaused” binding?
I’ll appreciate it so much!

I work it out myself. It’s amazing that Lua can define attribute by user.

spriteDog is a CCSprite as you said.

when spriteDog.isPaused=false is executed then an associated table is created and attached to spriteDog.
isPaused is stored in this associated table.

look at class_newindex_event and storeatubox

This is all magic and under the hood.

Andre

Andre Arpin wrote:

spriteDog is a CCSprite as you said.
>
when spriteDog.isPaused=false is executed then an associated table is created and attached to spriteDog.
isPaused is stored in this associated table.
>
look at class_newindex_event and storeatubox
>
This is all magic and under the hood.
>
Andre

Thank you so much!