I am having trouble to figure out how to get a reference to the selected
object of a DataViewCtrl. GetSelection() returns a DataViewItem which can be
processed by PyDataViewModel.ItemToObject to get the actual object.
Unfortunately DataViewCtrl.GetModel returns a DataViewModel instance which
lacks ItemToObject instead of PyDataViewModel. Is this a bug? How am I supposed to get a reference to
the object without being obliged to store a reference to the model myself?
Thanks, Christian
No idea… If I understand your questions correctly, I’ve been wondering the same stuff. I have frame.results which is the table, and then frame._results which is a pure list of the data I chuck into frame.results. Probably not the healthiest way of doing things, but it works.
Cheers,
Take care,
Chris Norman
chris.norman2@googlemail.com
···
On 13 May 2015, at 21:15, Christian K ckkart@gmail.com wrote:
I am having trouble to figure out how to get a reference to the selected
object of a DataViewCtrl. GetSelection() returns a DataViewItem which can be
processed by PyDataViewModel.ItemToObject to get the actual object.
Unfortunately DataViewCtrl.GetModel returns a DataViewModel instance which
lacks ItemToObject instead of PyDataViewModel. Is this a bug? How am I supposed to get a reference to
the object without being obliged to store a reference to the model myself?
Thanks, Christian
–
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.