On Thu, Oct 6, 2011 at 12:44 AM, Andy <[email protected]> wrote:

> Hey, I am still struggling to get this working.
>
> Why are restricted_fx,fy not initialized in scrolling_manager's
> constructor?
>
> As far as I can tell the editor does not call set_focus in __init__ or
> on_enter, or anywhere else other than after restricted_fx is
> referenced. I cannot figure out why it works.
>
> I have tried calling set_focus right after initializing the scrolling
> manager. It still doesn't create a restricted_fx. I have also tried
> doing a force_focus and a set_focus w/ force=True.
>
> If I set scroller.restricted_fx = 100, and then call set_focus(0,0),
> then print restricted_fx: it will be 100. So it seems set_focus is not
> affecting that variable. But I can get into the module code and I see
> where it the set_focus is setting the variable.
>
> scroller = cocos.layer.ScrollingManager()
>
> Would you like to see my code, or is there some test you think I
> should run?
>
> Thanks,
> Andy
>
>


Doing a grep / find in files in the protoeditor directory for the string
'set_focus' you get three hits.
The one in some_proxies.py does the necessary initialization

--
claudio

-- 
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