I've been learning python and wxpython for about a year ... I am using
python 2,6 and wxpython 2.8 window OS.... the problem is I have a
glitch with .GetStringSelection())... it doesn't always happen and
it's on the Pulse = str(self.pulse.GetStringSelection()) ... I get a
AttibuteError 'str' object has no attribute GetStringSelection.... the
weird thing is it doesn't happen all the time (i don't know what the
conditions are My trace back reveals nothing ) it's that particular
line bypassing other GetStringSelection to get to that one ... if I
remove the line it give the error for the next line ... This has led
me to believe that their is a conflict between wxpython and some
periodic operation windows OS carries out ... We looked at the sleep
and hibernate function and ruled them out ...has anyone seen this
glith before ? what causes it and what it the solution ? is their a
more stable way to get my info the GetStringSelection
def OnInsert(self, event):
try:
con = lite.connect('specialeventms2.sqlite')
cur = con.cursor()
Incident_number=(str(self.Ic_num))
Last_Name = str(self.tc1.GetValue())
First_Name =str(self.tc2.GetValue())
Age = str(self.tc3.GetValue())
Gender = str(self.cb3.GetStringSelection())
Address = str(self.tc4.GetValue())
City = str(self.tc5.GetValue())
State = str(self.tc6.GetStringSelection())
Zip = str(self.tc7.GetValue())
Ailment = str(self.cb1.GetStringSelection())
Treatment = str(self.cb2.GetStringSelection())
Patient_reprt = str(self.pr1.GetValue())
Initial_contact = str(self.initContact)
Hospital = str(self.Hospital1)
Destination =str(self.tc69.GetStringSelection())
Inservice = str(self.Inservice)
Provider_1 = str(self.tc20.GetStringSelection())
Provider_2= str(self.tc21.GetStringSelection())
Sys = str(self.systolic.GetStringSelection())
Dia = str(self.diastolic.GetStringSelection())
Pulse = str(self.pulse.GetStringSelection())
Resp = str(self.respiration.GetStringSelection())
Weather = str(self.weather1a)
Temp= str(self.weather2a)
Humid = str(self.weather3a)
Wind=str(self.weather4a)
TimeStamp =str(self.weather5a)