wxGrid and Column Label clicking - WARNING

Friday, November 18, 2005, 4:46:11 PM, Michael Beaulieu wrote:

I'm alarmed that my initial post has not garnered any attention ( but
one ) since the implication is that if you write an application, that
you want to run on windows, and you want to use the grid widget, you are
not well off.

As an example, I ran the Chandler ( osaf ) application and rendered it
useless in a matter of seconds. And don't get me wrong!! I like and
want to use Chandler.

I appreciate that the initial post is easy to laugh off, and that's why
I haven't posted to the wxwidgets list yet, but I don't really think
it's a laughing matter. By the way, I can duplicate this behaviour by
running the grid demo that comes with wxwidgets.

Anybody wanting to use the grid widget has to ( needs to ) understand
the implications of the issue at hand.

I would appreciate it if people who do use the grid widget might respond
just to give me an idea if there is anybody else interested in this issue.

Tried the GridSimple on the demo and I was able to reproduce the
behavior you described.

Commented out the line #15 and the issue disappeared:

  #self.Bind(wx.EVT_IDLE, self.OnIdle)

Maybe that's a EVT_IDLE issue, not a grid issue, and so perhaps the
same problem may arise with other widgets. OTOH, you could try to
workaround that by investigating if you do really need a EVT_IDLE
handled on your grid.

-- tacao

No bits were harmed during the making of this e-mail.

Hello NG & Michael,

Tried the GridSimple on the demo and I was able to reproduce the
behavior you described.

Commented out the line #15 and the issue disappeared:

  #self.Bind(wx.EVT_IDLE, self.OnIdle)

Mhm, in this respect, I don't think there is so much difference between
wxPython 2.6.1.1 prerelease and wxPython 2.6.1.0. May it be that the
EVT_IDLE has not enough time to be processed when you fast-click on the
grid?

def OnIdle(self, evt):
        if self.moveTo != None:
            self.SetGridCursor(self.moveTo[0], self.moveTo[1])
            self.moveTo = None

        evt.Skip()

From this point of view, the OS characteristics (speed, CPU, RAM and so on)

may be the bottleneck... But here I am just shooting in the dark. I have
tried as fast as I can (my mouse went in fire :wink: ) but I was not able to
reproduce the problem. If the platform characteristics may be a issue, I am
on a Windows XP machine, 1 GB RAM, AMD Athlon 3.2 GHz, 64 bit configured to
run on 32 bit Windows.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77

Sunday, November 20, 2005, 7:43:37 PM, E. A. Tacao wrote:

Tried the GridSimple on the demo and I was able to reproduce the
behavior you described.

Commented out the line #15 and the issue disappeared:

  #self.Bind(wx.EVT_IDLE, self.OnIdle)

Maybe that's a EVT_IDLE issue, not a grid issue, and so perhaps the
same problem may arise with other widgets. OTOH, you could try to
workaround that by investigating if you do really need a EVT_IDLE
handled on your grid.

I tried that on wxPython 2.6.1.0, Python 2.3.5, msw XP.

-- tacao

No bits were harmed during the making of this e-mail.

Sunday, November 20, 2005, 6:55:18 PM, Andrea Gavana wrote:

Hello NG & Michael,

Tried the GridSimple on the demo and I was able to reproduce the
behavior you described.

Commented out the line #15 and the issue disappeared:

  #self.Bind(wx.EVT_IDLE, self.OnIdle)

Mhm, in this respect, I don't think there is so much difference between
wxPython 2.6.1.1 prerelease and wxPython 2.6.1.0. May it be that the
EVT_IDLE has not enough time to be processed when you fast-click on the
grid?

def OnIdle(self, evt):
        if self.moveTo != None:
            self.SetGridCursor(self.moveTo[0], self.moveTo[1])
            self.moveTo = None

        evt.Skip()

From this point of view, the OS characteristics (speed, CPU, RAM and so on)
may be the bottleneck... But here I am just shooting in the dark. I have
tried as fast as I can (my mouse went in fire :wink: ) but I was not able to
reproduce the problem. If the platform characteristics may be a issue, I am
on a Windows XP machine, 1 GB RAM, AMD Athlon 3.2 GHz, 64 bit configured to
run on 32 bit Windows.

Sorry for my previous post, it was a false alarm. Tried several times
here only to find that sometimes the grid will freeze with the
EVT_IDLE bound, sometimes not. Sometimes the grid will freeze with the
EVT_IDLE not bound, sometimes not.

You know, there HAS to be another way to try to freeze grids other
than burning mice. 8^)

-- tacao

No bits were harmed during the making of this e-mail.

Hi Andrea and Tacao,

Thank you both for responding.

As a last word for now, I guess I'll say that I can reproduce the behaviour on any windows machine I touch ( I've tried it on six or seven now ) and I've also tried not binding to the Idle Event but this makes no difference for me.

Important note - from my experience, this will also occur ( randomly ) after extended use of an application with the grid widget in it.

If anyone can suggest how to intelligently describe this issue I guess I will log it with wxwidgets.

Thanks,
Michael Beaulieu

E. A. Tacao wrote:

ยทยทยท

Sunday, November 20, 2005, 6:55:18 PM, Andrea Gavana wrote:

Hello NG & Michael,

Tried the GridSimple on the demo and I was able to reproduce the
behavior you described.

Commented out the line #15 and the issue disappeared:

#self.Bind(wx.EVT_IDLE, self.OnIdle)

Mhm, in this respect, I don't think there is so much difference between
wxPython 2.6.1.1 prerelease and wxPython 2.6.1.0. May it be that the
EVT_IDLE has not enough time to be processed when you fast-click on the
grid?

def OnIdle(self, evt):
       if self.moveTo != None:
           self.SetGridCursor(self.moveTo[0], self.moveTo[1])
           self.moveTo = None

       evt.Skip()

From this point of view, the OS characteristics (speed, CPU, RAM and so on)
may be the bottleneck... But here I am just shooting in the dark. I have
tried as fast as I can (my mouse went in fire :wink: ) but I was not able to
reproduce the problem. If the platform characteristics may be a issue, I am
on a Windows XP machine, 1 GB RAM, AMD Athlon 3.2 GHz, 64 bit configured to
run on 32 bit Windows.

Sorry for my previous post, it was a false alarm. Tried several times
here only to find that sometimes the grid will freeze with the
EVT_IDLE bound, sometimes not. Sometimes the grid will freeze with the
EVT_IDLE not bound, sometimes not.

You know, there HAS to be another way to try to freeze grids other
than burning mice. 8^)

-- tacao

No bits were harmed during the making of this e-mail.

Friday, November 25, 2005, 2:54:12 PM, Michael Beaulieu wrote:

As a last word for now, I guess I'll say that I can reproduce the
behaviour on any windows machine I touch ( I've tried it on six or
seven now ) and I've also tried not binding to the Idle Event but
this makes no difference for me.

Important note - from my experience, this will also occur ( randomly
) after extended use of an application with the grid widget in it.

If anyone can suggest how to intelligently describe this issue I
guess I will log it with wxwidgets.

It would be a good idea to try to implement a sort of grid stress test
to find out whether this issue is be related to event processing or to
the way wx processes grid selections. The latter could be achieved by
generating random numbers inside a loop and selecting cells or entire
rows or entire cols according to the generated number. As for the
first, I have no idea on how to create fake mouse events.

-- tacao

No bits were harmed during the making of this e-mail.