Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Solved] Somes problems with sf.Event  (Read 17527 times)

0 Members and 1 Guest are viewing this topic.

gaulois94

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: Somes problems with sf.Event
« Reply #15 on: July 13, 2013, 04:19:13 pm »
Hi again :) . For the problem, I see that the view is also resize,  (whereas the default behaviour is that the view isn't resize).

gaulois94

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: Somes problems with sf.Event
« Reply #16 on: July 13, 2013, 04:50:46 pm »
Sorry it's me again. I went to see your code, and I see a very strange thing :
def __init__(self, VideoMode mode, title, Uint32 style=sf.style.Default, ContextSettings settings=None):
                if self.__class__.__name__ != 'RenderWindow':
                        if self.__class__ is Window:
                                if not settings: self.p_window = new sf.Window(mode.p_this[0], toEncodedString(title), style)
                                else: self.p_window = new sf.Window(mode.p_this[0], toEncodedString(title), style, settings.p_this[0])

                        else:
                                if not settings: self.p_window = <sf.Window*>new DerivableWindow(mode.p_this[0], toEncodedString(title), style)
                                else: self.p_window = <sf.Window*>new DerivableWindow(mode.p_this[0], toEncodedString(title), style, settings.p_this[0])
                                (<DerivableWindow*>self.p_window).set_pyobj(<void*>self)

Why you didn't do an else about this line : if self.__class__.__name__ != 'RenderWindow': ?
Others things, I see the missing variables are on DerivableWindow. I think it miss a call about his constructor.

Thanks again :) .
« Last Edit: July 13, 2013, 05:04:18 pm by gaulois94 »

gaulois94

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: Somes problems with sf.Event
« Reply #17 on: July 16, 2013, 12:03:28 am »
Check the french forum, I think you will more understand than here (where I speak English x) ).

gaulois94

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: Somes problems with sf.Event
« Reply #18 on: July 18, 2013, 06:49:27 pm »
Yeah I find the solution : Replace
if self.__class__ is not RenderWindow:
by
if not isinstance(self,RenderWindow)
in drawable.pyx :) .

I think others objects haves this problem with inheritance. Please, check them when you have time :D

Sonkun

  • Moderator
  • Full Member
  • *****
  • Posts: 241
    • View Profile
Re: Somes problems with sf.Event
« Reply #19 on: July 21, 2013, 06:24:50 am »
I just answered on the French forum: http://fr.sfml-dev.org/forums/index.php?topic=12244.0

I guess I'll give feedbacks here once this issue is solved.
Interested in using SFML with Python ? Try out its Python binding!

Sonkun

  • Moderator
  • Full Member
  • *****
  • Posts: 241
    • View Profile
Re: [Solved] Somes problems with sf.Event
« Reply #20 on: November 04, 2013, 10:05:21 am »
This bug has been fixed in commit 19c077c
Interested in using SFML with Python ? Try out its Python binding!

 

anything