wx.EventFilter Documentation error

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wx.EventFilter Documentation error

nathan Turner
I wanted to ask the group about a possible error in the wx.EventFilter documentation here:

In the code in FilterEvent I believe a return needs to be added in front of the self.Event_Skip.

    def FilterEvent(self, event):

       
# Update the last user activity
       
t = event.GetEventType()

       
if t == wx.EVT_KEY_DOWN.typeId or t == wx.EVT_MOTION.typeId or \
           
t == wx.EVT_LEFT_DOWN.typeId or t == wx.EVT_RIGHT_DOWN.typeId or \
           
t == wx.EVT_MIDDLE_DOWN.typeId:

           
self.last = wx.DateTime.Now()


       
# Continue processing the event normally as well.
       
self.Event_Skip

I wasn't sure the proper method for offering to edit docs.

   #Continue processing the event normally as well.
   
return self.Event_Skip


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wx.EventFilter Documentation error

Dietmar Schwertberger-2
On 6/21/17 4:24 AM, nathan Turner wrote:
> I wasn't sure the proper method for offering to edit docs.
This code lives at
https://github.com/wxWidgets/Phoenix/blob/master/docs/sphinx/rest_substitutions/snippets/python/converted/wx.EventFilter.1.py
I would suggest to upload a pull request or submit the issue at
https://github.com/wxWidgets/Phoenix/issues

Regards,

Dietmar

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wx.EventFilter Documentation error

Metallicow-2
In reply to this post by nathan Turner


On Wednesday, June 21, 2017 at 10:18:13 AM UTC-5, nathan Turner wrote:

   #Continue processing the event normally as well.
   
return self.Event_Skip


That looks like it should be written...
event.Skip()

 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wx.EventFilter Documentation error

nathan Turner
Yes actually I tried that when first implementing the EventFilter, but it failed.  In my testing this thing only works when I return an integer, and self.Event_Skip, self.Event_Processed, self.Event_Ignore are predefined constants of those int values.   self.Event_Skip resolves to -1, and then all events passing through this propagate as expected.

On Wednesday, June 21, 2017 at 12:21:28 PM UTC-5, Metallicow wrote:


On Wednesday, June 21, 2017 at 10:18:13 AM UTC-5, nathan Turner wrote:

   #Continue processing the event normally as well.
   
return self.Event_Skip


That looks like it should be written...
event.Skip()

 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wx.EventFilter Documentation error

nathan Turner
In reply to this post by Dietmar Schwertberger-2
Thank you Dietmar for the pointer to the Repo.  I did end up submitting a pull request here:

https://github.com/wxWidgets/Phoenix/pull/407


On Wednesday, June 21, 2017 at 11:53:24 AM UTC-5, Dietmar Schwertberger wrote:
On 6/21/17 4:24 AM, nathan Turner wrote:
> I wasn't sure the proper method for offering to edit docs.
This code lives at
<a href="https://github.com/wxWidgets/Phoenix/blob/master/docs/sphinx/rest_substitutions/snippets/python/converted/wx.EventFilter.1.py" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fblob%2Fmaster%2Fdocs%2Fsphinx%2Frest_substitutions%2Fsnippets%2Fpython%2Fconverted%2Fwx.EventFilter.1.py\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFRpvhHyqdaMMqG9NsxfMTp82ySAg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fblob%2Fmaster%2Fdocs%2Fsphinx%2Frest_substitutions%2Fsnippets%2Fpython%2Fconverted%2Fwx.EventFilter.1.py\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFRpvhHyqdaMMqG9NsxfMTp82ySAg&#39;;return true;">https://github.com/wxWidgets/Phoenix/blob/master/docs/sphinx/rest_substitutions/snippets/python/converted/wx.EventFilter.1.py
I would suggest to upload a pull request or submit the issue at
<a href="https://github.com/wxWidgets/Phoenix/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGjGkijqfCg5AbxrYLJnUHgKN-cBw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGjGkijqfCg5AbxrYLJnUHgKN-cBw&#39;;return true;">https://github.com/wxWidgets/Phoenix/issues

Regards,

Dietmar

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wx.EventFilter Documentation error

nathan Turner
Interesting enough "Travis" has failed on 4 different tests.  I noticed Robin tried to do a pull and failed in the same way so hopefully it's just a server issue.  I don't know how my pull would have broken Environment Varibles.

On Wednesday, June 21, 2017 at 1:21:54 PM UTC-5, nathan Turner wrote:
Thank you Dietmar for the pointer to the Repo.  I did end up submitting a pull request here:

<a href="https://github.com/wxWidgets/Phoenix/pull/407" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fpull%2F407\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAS8Ua1cIrAhfXb13Q8Y1tBQbTxg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fpull%2F407\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAS8Ua1cIrAhfXb13Q8Y1tBQbTxg&#39;;return true;">https://github.com/wxWidgets/Phoenix/pull/407


On Wednesday, June 21, 2017 at 11:53:24 AM UTC-5, Dietmar Schwertberger wrote:
On 6/21/17 4:24 AM, nathan Turner wrote:
> I wasn't sure the proper method for offering to edit docs.
This code lives at
<a href="https://github.com/wxWidgets/Phoenix/blob/master/docs/sphinx/rest_substitutions/snippets/python/converted/wx.EventFilter.1.py" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fblob%2Fmaster%2Fdocs%2Fsphinx%2Frest_substitutions%2Fsnippets%2Fpython%2Fconverted%2Fwx.EventFilter.1.py\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFRpvhHyqdaMMqG9NsxfMTp82ySAg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fblob%2Fmaster%2Fdocs%2Fsphinx%2Frest_substitutions%2Fsnippets%2Fpython%2Fconverted%2Fwx.EventFilter.1.py\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFRpvhHyqdaMMqG9NsxfMTp82ySAg&#39;;return true;">https://github.com/wxWidgets/Phoenix/blob/master/docs/sphinx/rest_substitutions/snippets/python/converted/wx.EventFilter.1.py
I would suggest to upload a pull request or submit the issue at
<a href="https://github.com/wxWidgets/Phoenix/issues" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGjGkijqfCg5AbxrYLJnUHgKN-cBw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGjGkijqfCg5AbxrYLJnUHgKN-cBw&#39;;return true;">https://github.com/wxWidgets/Phoenix/issues

Regards,

Dietmar

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...