From: Steven P. <n9...@n9...> - 2003-12-08 15:44:32
|
On Dec 8, 2003, at 5:32 AM, Roger Binns wrote: > I was trying to figure out the minimal number of changes to make it > work (ie finding exactly what was tickling the bug). Okay, I'll focus on that as a goal. > the entries. Maybe it was the sort flag that was causing the crashes? That has made no change here. > Comboboxes obviously work on the Mac so it is some minor detail we > do that the demos etc don't do. Can you please insert a check line? print "Selected = ", self.phonebox.GetSelection() I'd be curious to see what that does on a Windows or Linux install. I have a hunch that calling the GetValue() method for an undefined selection is not causing a coredump on Linux/Windows, but instead returns an empty string. Then, when you call SetValue(), everything is fine. I inserted the statement right above here: print "pb=",self.phonebox.GetValue() if self.phonebox.GetValue()=="": self.phonebox.SetValue("LG-VX4400") To test this theory, I inserted the line: self.phonebox.SetValue("LG-VX4400") right after the line where the box is created: self.phonebox=wxComboBox(self, -1, 'LG-VX4400', style=wxCB_DROPDOWN|wxCB_READONLY,choices=keys) And now it no longer crashes. To narrow it down, it would be helpful to know if Linux and/or Windows are properly setting the selection when the combobox is being initialized. If they are, then this is where the Mac is deviating. If they are not, then the error on the Mac would seem to be when the GetValue() method is called when the combobox selection is not valid. Make sense? -. ----. -.-- - -.-- Steve Palm - n9...@n9... -. ----. -.-- - -.-- |