DataViewModel Cleared() problem on GTK

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

I am using the latest 3.0.1.1

···

On Monday, October 6, 2014 3:59:59 PM UTC-5, zliwang wrote:

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

have you tried calling Refresh() on the DataViewModel?

···

On Monday, October 6, 2014 2:00:22 PM UTC-7, zliwang wrote:

I am using the latest 3.0.1.1

On Monday, October 6, 2014 3:59:59 PM UTC-5, zliwang wrote:

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

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

···

On Monday, October 6, 2014 4:22:01 PM UTC-5, Nathan McCorkle wrote:

have you tried calling Refresh() on the DataViewModel?

On Monday, October 6, 2014 2:00:22 PM UTC-7, zliwang wrote:

I am using the latest 3.0.1.1

On Monday, October 6, 2014 3:59:59 PM UTC-5, zliwang wrote:

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

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

···

On Monday, October 6, 2014 3:04:05 PM UTC-7, zliwang wrote:

thanks for the suggestion. I tried to call the corresponding dataViewCtrl’s refresh() but it make no difference…

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

···

On Mon, Oct 6, 2014 at 5:52 PM, Nathan McCorkle nmz787@gmail.com wrote:

On Monday, October 6, 2014 3:04:05 PM UTC-7, zliwang wrote:

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 wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

zliwang wrote:

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.

Agreed. Please create a Trac ticket about it.

···

--
Robin Dunn
Software Craftsman

Thanks for the reply. I just filed a bug report.

-Xiang

···

On Tue, Oct 7, 2014 at 2:02 AM, Robin Dunn robin@alldunn.com wrote:

zliwang wrote:

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.

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 wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.