On Wed, Jul 7, 2010 at 10:14 AM, claudio canepa <[email protected]> wrote:
> c.on_enter()
> File "D:\tmp\cocos2d-0.4rc0\test\test_scrolling_manager_without_tiles.py",
> lin
> e 134, in on_enter
> self.scene = self.get_ancestor(cocos.scene.Scene)
> AttributeError: can't set attribute
>
> Going back in time it was r1007 which broke the thing.
> Looking at the diff ...
> ok, the problem is you added a property 'scene', read-only, that explains
> the traceback, I can fix by not setting it and reading from your property.

Yep, again I apologise for not running the tests, or adding to them
with my new functionality. My sincere apologies. I'm just madly trying
to get stuff ready for this tutorial ;-)


> But, lets see if it is an useful addition:
>     - the value is easy to obtain, no great easiness value
> ( self.get_ancestor(cocos.scene.Scene) )
>     - each access to property needs a function call, vs the app sets a
> member scene and access only a member
>     - cocosnode gets bloated, and is enough big atm

I found I was accessing the scene a lot, so I added it for convenience.

The layer accessor I added turns out to be much less used.

It seemed like a good idea at the time :-)

Then I discovered the scene is accessible through the director (while
doing the quickref)... and though I am generally really not so happy
with accessing information through a global singleton like that, it
kinda makes sense in the context of cocos (which, by the way, I only
just learnt yesterday means coconut :-)


> So, can you agree to delete this properties ? (And fix dependencies on this
> if you introduced some ?)

I have no problem with removing these properties. I have done so.


     Richard

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en.

Reply via email to