[Boa Constr] Boa .061
Status: Beta
Brought to you by:
riaan
From: gianfranco b. <bg...@ya...> - 2007-08-06 16:32:21
|
Hello,=0A=0AI just updated to version .6.1 , python 2.5.1and wxpython 2.8.4= ansi (or unicode,I tried both)=0A=0AWhen I want to edit this file=0A=0A#Bo= a:Frame:Frame1=0A=0Aimport wx=0Aimport wx.calendar=0Aimport Dialog1=0Aimpor= t Dialog2=0A=0Adef create(parent):=0A return Frame1(parent)=0A=0A[wxID_F= RAME1, wxID_FRAME1BUTTON1, wxID_FRAME1BUTTON3, =0A wxID_FRAME1CALENDARCTRL1= , wxID_FRAME1COMBOBOX1, wxID_FRAME1PANEL1, =0A wxID_FRAME1SLIDER1, wxID_FRA= ME1STATICBOX1, wxID_FRAME1STATICBOX2, =0A wxID_FRAME1STATICTEXT1, wxID_FRAM= E1STATICTEXT2, wxID_FRAME1STATICTEXT3, =0A wxID_FRAME1STATICTEXT4, wxID_FRA= ME1STATICTEXT5, wxID_FRAME1STATICTEXT6, =0A wxID_FRAME1STATICTEXT7, wxID_FR= AME1STATICTEXT8, =0A] =3D [wx.NewId() for _init_ctrls in range(17)]=0A=0Acl= ass Frame1(wx.Frame):=0A def _init_ctrls(self, prnt):=0A # genera= ted method, don't edit=0A wx.Frame.__init__(self, id=3DwxID_FRAME1, = name=3D'', parent=3Dprnt,=0A pos=3Dwx.Point(187, 26), size=3Dw= x.Size(527, 487),=0A style=3Dwx.DEFAULT_FRAME_STYLE, title=3D'= Schermo di partenza')=0A self.SetClientSize(wx.Size(519, 460))=0A=0A= self.panel1 =3D wx.Panel(id=3DwxID_FRAME1PANEL1, name=3D'panel1', p= arent=3Dself,=0A pos=3Dwx.Point(0, 0), size=3Dwx.Size(519, 460= ),=0A style=3Dwx.TAB_TRAVERSAL)=0A=0A self.button1 =3D = wx.Button(id=3DwxID_FRAME1BUTTON1,=0A label=3D'Apre una finest= ra per valore', name=3D'button1',=0A parent=3Dself.panel1, pos= =3Dwx.Point(48, 120), size=3Dwx.Size(200, 23),=0A style=3D0)= =0A self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,=0A = id=3DwxID_FRAME1BUTTON1)=0A=0A self.staticText1 =3D wx.Static= Text(id=3DwxID_FRAME1STATICTEXT1,=0A label=3D'Questo serve per= provare il bottone', name=3D'staticText1',=0A parent=3Dself.p= anel1, pos=3Dwx.Point(88, 40), size=3Dwx.Size(262, 21),=0A sty= le=3D0)=0A self.staticText1.SetFont(wx.Font(11, wx.SWISS, wx.NORMAL,= wx.BOLD,=0A False, 'Comic Sans MS'))=0A=0A self.static= Text2 =3D wx.StaticText(id=3DwxID_FRAME1STATICTEXT2,=0A label= =3D'Questo il testo che cambia.....', name=3D'staticText2',=0A = parent=3Dself.panel1, pos=3Dwx.Point(104, 240), size=3Dwx.Size(149, 13),= =0A style=3D0)=0A self.staticText2.SetForegroundColour(= wx.Colour(255, 0, 0))=0A self.staticText2.SetBackgroundColour(wx.Col= our(255, 255, 0))=0A=0A self.comboBox1 =3D wx.ComboBox(choices=3D["a= ncora", 12, 14],=0A id=3DwxID_FRAME1COMBOBOX1, name=3D'comboBo= x1', parent=3Dself.panel1,=0A pos=3Dwx.Point(304, 96), size=3D= wx.Size(168, 21), style=3D0,=0A value=3D'Scegli')=0A se= lf.comboBox1.SetLabel('Scegli')=0A self.comboBox1.Bind(wx.EVT_TEXT, = self.OnComboBox1Text,=0A id=3DwxID_FRAME1COMBOBOX1)=0A=0A = self.staticText3 =3D wx.StaticText(id=3DwxID_FRAME1STATICTEXT3,=0A = label=3D'Il tipo ', name=3D'staticText3', parent=3Dself.panel1,=0A = pos=3Dwx.Point(112, 264), size=3Dwx.Size(34, 13), style=3D0)= =0A self.staticText3.SetBackgroundColour(wx.Colour(128, 128, 255))= =0A self.staticText3.SetForegroundColour(wx.Colour(0, 255, 0))=0A=0A= self.staticBox1 =3D wx.StaticBox(id=3DwxID_FRAME1STATICBOX1,=0A = label=3D'Ambaradan', name=3D'staticBox1', parent=3Dself.panel1,= =0A pos=3Dwx.Point(16, 88), size=3Dwx.Size(256, 144), style=3D= 0)=0A self.staticBox1.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BO= LD, False,=0A 'Microsoft Sans Serif'))=0A=0A self.slide= r1 =3D wx.Slider(id=3DwxID_FRAME1SLIDER1, maxValue=3D100,=0A m= inValue=3D0, name=3D'slider1', parent=3Dself.panel1, point=3Dwx.Point(64,= =0A 320), size=3Dwx.DefaultSize, style=3Dwx.SL_HORIZONTAL, val= ue=3D0)=0A self.slider1.Bind(wx.EVT_COMMAND_SCROLL_THUMBRELEASE,=0A = self.OnSlider1CommandScrollThumbrelease, id=3DwxID_FRAME1SLIDE= R1)=0A=0A self.staticText4 =3D wx.StaticText(id=3DwxID_FRAME1STATICT= EXT4,=0A label=3D'Valore slide', name=3D'staticText4', parent= =3Dself.panel1,=0A pos=3Dwx.Point(112, 296), size=3Dwx.Size(54= , 13), style=3D0)=0A=0A self.calendarCtrl1 =3D wx.calendar.CalendarC= trl(date=3Dwx.DateTime.Now(),=0A id=3DwxID_FRAME1CALENDARCTRL1= , name=3D'calendarCtrl1',=0A parent=3Dself.panel1, pos=3Dwx.Po= int(304, 128), size=3Dwx.Size(179,=0A 128), style=3Dwx.calenda= r.CAL_SHOW_HOLIDAYS)=0A=0A self.staticBox2 =3D wx.StaticBox(id=3DwxI= D_FRAME1STATICBOX2,=0A label=3D'staticBox2', name=3D'staticBox= 2', parent=3Dself.panel1,=0A pos=3Dwx.Point(288, 72), size=3Dw= x.Size(200, 248), style=3D0)=0A=0A self.button3 =3D wx.Button(id=3Dw= xID_FRAME1BUTTON3,=0A label=3D'Sceglie due date', name=3D'butt= on3', parent=3Dself.panel1,=0A pos=3Dwx.Point(48, 168), size= =3Dwx.Size(200, 23), style=3D0)=0A self.button3.Bind(wx.EVT_BUTTON, = self.OnButton3Button,=0A id=3DwxID_FRAME1BUTTON3)=0A=0A = self.staticText5 =3D wx.StaticText(id=3DwxID_FRAME1STATICTEXT5,=0A = label=3D'Data inizio e', name=3D'staticText5', parent=3Dself.panel1,= =0A pos=3Dwx.Point(48, 368), size=3Dwx.Size(72, 13), style=3D0= )=0A=0A self.staticText6 =3D wx.StaticText(id=3DwxID_FRAME1STATICTEX= T6, label=3D'',=0A name=3D'staticText6', parent=3Dself.panel1,= pos=3Dwx.Point(296, 368),=0A size=3Dwx.Size(0, 13), style=3D0= )=0A=0A self.staticText7 =3D wx.StaticText(id=3DwxID_FRAME1STATICTEX= T7,=0A label=3D'Data Fine e ', name=3D'staticText7', parent=3D= self.panel1,=0A pos=3Dwx.Point(48, 400), size=3Dwx.Size(58, 13= ), style=3D0)=0A=0A self.staticText8 =3D wx.StaticText(id=3DwxID_FRA= ME1STATICTEXT8, label=3D'',=0A name=3D'staticText8', parent=3D= self.panel1, pos=3Dwx.Point(296, 416),=0A size=3Dwx.Size(0, 13= ), style=3D0)=0A=0A def __init__(self, parent):=0A self._init_ctr= ls(parent)=0A=0A def OnButton1Button(self, event):=0A self.dia = =3D Dialog1.create(self)=0A self.dia.ShowModal()=0A txt =3D '= La Valeur est : '+ self.dia.transfer()=0A tipo =3D type(self.dia.tra= nsfer())=0A self.staticText2.SetLabel(txt)=0A self.staticText= 3.SetLabel('Il tipo non e :'+ tipo) =0A self.dia.Destroy()=0A=0A = def OnSlider1CommandScrollThumbrelease(self, event):=0A event.Skip()= =0A=0A def OnSlider1CommandScrollThumbtrack(self, event):=0A self= .staticText4.label =3D self.slider1=0A=0A def OnComboBox1Text(self, even= t):=0A prova =3D self.comboBox1.GetValue()=0A self.staticText= 2.SetLabel(prova)=0A=0A def OnButton3Button(self, event):=0A self= .dia2 =3D Dialog2.create(self)=0A self.dia2.ShowModal()=0A tx= t2 =3D self.dia2.transfer()=0A self.staticText5.SetLabel(str(t= xt2[0]))=0A self.staticText7.SetLabel(str(txt2[1]))=0A self.d= ia2.Destroy()=0A=0A=0AI get the following error=0A=0A15:25:40: Traceback (m= ost recent call last): =0A15:25:40: File "Models\PythonControllers.pyc", = line 207, in OnRunApp =0A15:25:40: File "Models\PythonEditorModels.pyc", = line 174, in run =0A15:25:40: UnicodeDecodeError: 'ascii' codec can't decod= e byte 0xe9 in position 2: ordinal not in range(128) =0A16:37:53: Traceback= (most recent call last): =0A16:37:53: File "Models\wxPythonControllers.p= yc", line 78, in OnDesigner =0A16:37:53: File "Models\wxPythonControllers= .pyc", line 143, in showDesigner =0A16:37:53: File "Views\Designer.pyc", = line 399, in refreshCtrl =0A16:37:53: File "Views\InspectableViews.pyc", = line 127, in initObjectsAndCompanions =0A16:37:53: File "Views\Designer.p= yc", line 529, in initObjCreator =0A16:37:53: File "Views\InspectableView= s.pyc", line 155, in initObjCreator =0A16:37:53: File "Views\Designer.pyc= ", line 491, in loadControl =0A16:37:53: File "Companions\BaseCompanions.= pyc", line 594, in designTimeControl =0A16:37:53: File "wx\_controls.pyc"= , line 589, in __init__ =0A16:37:53: TypeError: String or Unicode type requ= ired =0A=0AHow can I fix it ?=0A=0AWhen I try to save it I get a =0A=0A15:2= 6:43: Traceback (most recent call last): =0A15:26:43: File "Models\wxPyth= onControllers.pyc", line 78, in OnDesigner =0A15:26:43: File "Models\wxPy= thonControllers.pyc", line 143, in showDesigner =0A15:26:43: File "Views\= Designer.pyc", line 399, in refreshCtrl =0A15:26:43: File "Views\Inspecta= bleViews.pyc", line 127, in initObjectsAndCompanions =0A15:26:43: File "V= iews\Designer.pyc", line 529, in initObjCreator =0A15:26:43: File "Views\= InspectableViews.pyc", line 155, in initObjCreator =0A15:26:43: File "Vie= ws\Designer.pyc", line 491, in loadControl =0A15:26:43: File "Companions\= BaseCompanions.pyc", line 594, in designTimeControl =0A15:26:43: File "wx= \_controls.pyc", line 589, in __init__ =0A15:26:43: TypeError: String or Un= icode type required =0A18:30:46: Traceback (most recent call last): =0A18:3= 0:46: File "Models\PythonControllers.pyc", line 422, in OnSave =0A18:30:4= 6: File "Models\Controllers.pyc", line 162, in OnSave =0A18:30:46: File= "Editor.pyc", line 985, in activeModSaveOrSaveAs =0A18:30:46: File "Edit= orUtils.pyc", line 423, in saveOrSaveAs =0A18:30:46: UnicodeDecodeError: 'a= scii' codec can't decode byte 0xe9 in position 12: ordinal not in range(128= ) =0A=0A=0AWhat's wrong ?=0AIt was working fine before.=0A=0AThanks=0A=0AGi= anfranco=0A=0A=0A=0A=0A=0A =0A_______________________________________= _____________________________________________=0ASick sense of humor? Visit = Yahoo! TV's =0AComedy with an Edge to see what's on, when. =0Ahttp://tv.yah= oo.com/collections/222 |