Discussion:
DataViewModel Cleared() problem on GTK
zliwang
2014-10-06 20:59:59 UTC
Permalink
Hi
When I call DataViewModel's Cleared() method on Linux GTK, it does cause
data model to be reread, but the control is cleared, no view is displayed.
anymore.

The same code works fine on Windows, the view changes based on the new data
model.

Any workaround or if I am doing something wrong? Any help is much
appreciated.

Thanks
-Xiang
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
zliwang
2014-10-06 21:00:22 UTC
Permalink
I am using the latest 3.0.1.1
Post by zliwang
Hi
When I call DataViewModel's Cleared() method on Linux GTK, it does cause
data model to be reread, but the control is cleared, no view is displayed.
anymore.
The same code works fine on Windows, the view changes based on the new
data model.
Any workaround or if I am doing something wrong? Any help is much
appreciated.
Thanks
-Xiang
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-10-06 21:22:01 UTC
Permalink
have you tried calling Refresh() on the DataViewModel?
Post by zliwang
I am using the latest 3.0.1.1
Post by zliwang
Hi
When I call DataViewModel's Cleared() method on Linux GTK, it does cause
data model to be reread, but the control is cleared, no view is displayed.
anymore.
The same code works fine on Windows, the view changes based on the new
data model.
Any workaround or if I am doing something wrong? Any help is much
appreciated.
Thanks
-Xiang
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
zliwang
2014-10-06 22:04:05 UTC
Permalink
thanks for the suggestion. I tried to call the corresponding dataViewCtrl's
refresh() but it make no difference..

Using wxPython's DVC_DataViewModel demo, add self.model.Cleared() at the
end of
the __init__ method of TestPanel:

class TestPanel(wx.Panel):
def __init__(self, parent, log, data=None, model=None):
...
self.model.Cleared()
self.dvc.Refresh()


Save changes and restart demo, the view is gone on Linux GTK. This looks
like a bug.

-Xiang
Post by Nathan McCorkle
have you tried calling Refresh() on the DataViewModel?
Post by zliwang
I am using the latest 3.0.1.1
Post by zliwang
Hi
When I call DataViewModel's Cleared() method on Linux GTK, it does cause
data model to be reread, but the control is cleared, no view is displayed.
anymore.
The same code works fine on Windows, the view changes based on the new
data model.
Any workaround or if I am doing something wrong? Any help is much
appreciated.
Thanks
-Xiang
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-10-06 22:52:14 UTC
Permalink
Post by zliwang
thanks for the suggestion. I tried to call the corresponding
dataViewCtrl's refresh() but it make no difference..
If you post a sample app file, we can try it out. Personally I've got
Windows 7, XP (2.9.4 and 3.0.1-preview), and Ubuntu 14.04 with
compiled-by-me wxPython 3.0.1.1
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Xiang Li
2014-10-07 00:40:56 UTC
Permalink
This can be easily tested by simply using wxPython's demo
DVC_DataViewModel.

Add self.model.Cleared() at the end ofthe __init__ method of TestPanel:

class TestPanel(wx.Panel):
def __init__(self, parent, log, data=None, model=None):
...
# Add this call
self.model.Cleared() or
wx.CallAfter(self.model.Cleared)

The view will not show. It works on Windows and Mac. I also built wxPthon
3.0.1.1 myself on Fedora.


-Xiang
Post by Nathan McCorkle
Post by zliwang
thanks for the suggestion. I tried to call the corresponding
dataViewCtrl's refresh() but it make no difference..
If you post a sample app file, we can try it out. Personally I've got
Windows 7, XP (2.9.4 and 3.0.1-preview), and Ubuntu 14.04 with
compiled-by-me wxPython 3.0.1.1
--
You received this message because you are subscribed to a topic in the
Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/wxpython-users/9wEUu5zjq04/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robin Dunn
2014-10-07 07:02:04 UTC
Permalink
Post by zliwang
thanks for the suggestion. I tried to call the corresponding
dataViewCtrl's refresh() but it make no difference..
Using wxPython's DVC_DataViewModel demo, add self.model.Cleared() at the
end of
...
self.model.Cleared()
self.dvc.Refresh()
Save changes and restart demo, the view is gone on Linux GTK. This looks
like a bug.
Agreed. Please create a Trac ticket about it.
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Xiang Li
2014-10-07 17:05:47 UTC
Permalink
Thanks for the reply. I just filed a bug report.

-Xiang
Post by Robin Dunn
Post by zliwang
thanks for the suggestion. I tried to call the corresponding
dataViewCtrl's refresh() but it make no difference..
Using wxPython's DVC_DataViewModel demo, add self.model.Cleared() at the
end of
...
self.model.Cleared()
self.dvc.Refresh()
Save changes and restart demo, the view is gone on Linux GTK. This looks
like a bug.
Agreed. Please create a Trac ticket about it.
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
You received this message because you are subscribed to a topic in the
Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/wxpython-users/9wEUu5zjq04/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...