Basil Shubin wrote:
Paul McNett пишет:
Basil Shubin wrote:
Ed Leafe пишет:
On Oct 28, 2006, at 8:03 AM, Basil Shubin wrote:
For each left button double click it has generate two events. How I
can disable second event raise? For example when I double click on
dGrid row I got dialog box for editing, but when I close it, it
appears again, because of two same event in a queue.
Is this on Windows? There is something odd in the Windows event
system in wxPython that occasionally generates double events. The
work-around is to trap the event and skip it if it is a duplicate.
If you look at the source code in dFormMixin.py, you can see an
example of how we handled the double Activate events under Windows.
I have set 'self._skipActivate=True' in dGrid subclass, but nothing
happens. I still got TWO events by double clicking on a cell. Please,
I need yours help. Maybe there is a workaround for problem like this?
Setting self._skipActivate wouldn't solve your problem, because that
is for skipping the Activate event, not a double-click event. Anyway,
I just ran a test and couldn't duplicate your problem.
Could you please edit dabo/ui/uiwx/dGrid.py, by finding the section
(line 4191 in the version I have):
"""
if __name__ == '__main__':
class TestForm(dabo.ui.dForm):
def afterInit(self):
self.BackColor = "khaki"
g = self.grid = _dGrid_test(self, RegID="sampleGrid")
"""
and changing that to read:
"""
if __name__ == '__main__':
class TestForm(dabo.ui.dForm):
def onDClickTest(self, evt):
print "*"
def afterInit(self):
self.BackColor = "khaki"
g = self.grid = _dGrid_test(self, RegID="sampleGrid")
g.bindEvent(dabo.dEvents.GridMouseLeftDoubleClick,
self.onDClickTest)
"""
and then run dGrid.py. When I run it, I only see one * for each
double-click in a cell. What about you?
But I see two * for each double-click in a cell :-( Totally confused!
What to do next?
BTW wxPython 2.6.3.2.1.5 and python 2.4.3 (everything from Debian
'testing' distro), Dabo 0.6.5 (for Linux).
Okay, I tested with dabo-stable and see the double-events on my system.
So, I did some regression testing on the development branch and found
that the problem was fixed back in May, in revision 2148:
"""
[EMAIL PROTECTED]:~/projects/dabo$ svn log -r 2148
------------------------------------------------------------------------
r2148 | paul | 2006-05-11 11:25:30 -0700 (Thu, 11 May 2006) | 5 lines
Removed the handling of the grid cell mouse events, and reimplemented them
using plain mouse events to avoid event duplication.
Resolves tracker issue 0137.
"""
I'll look over the diff, and if it looks relatively benign, I'll apply
it to dabo-stable and roll a dabo-0.6.6 release.
We are planning a dabo-0.7 stable release soon, but in part because it
has been so long, it is a bit more work to get that together than Ed and
I have time for right now. I'm really happy with how 0.7 is shaping up,
and would encourage you to move to it, if not now, when it is released
to dabo-stable.
--
pkm ~ http://paulmcnett.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users