GenButton ID

Help
othiery
2006-10-25
2013-05-01
  • othiery
    othiery
    2006-10-25

    Hi,

    Boa 0.4.4 designer used to create for genButtons like :

    self.genButton1 = wx.lib.buttons.GenButton(ID=wxID_FRAME1GENBUTTON1,
                  label='genButton1', name='genButton1', parent=self,
                  pos=wx.Point(80, 56), size=wx.Size(76, 25), style=0)

    while the last boa from cvs designer creates code like that one :

    self.genButton1 = wx.lib.buttons.GenButton(id=wxID_FRAME1GENBUTTON1,
                  label='genButton1', name='genButton1', parent=self,
                  pos=wx.Point(80, 56), size=wx.Size(76, 25), style=0)

    The first fashion works only with wxPython 2.6.x while the second one works only with wxPython 2.7.x

    I guess the small ID/id change is meant to adapt to wxPython 2.7.x, but is there a workaround?

    Olivier

     
    • Hi Olivier,

      IIRC this is a problem with the GenButton modul, it changed keywords like "ID" to "id".  If you want to use Boa 05 with both 2.6 and 2.7 then I would update the GenButton modul in 2.6 (i.e. do a diff between the 2.6 and 2.7 or just try to use the 2.7 version in 2.6).

      Werner

       
    • othiery
      othiery
      2006-11-03

      Thanks for your answer.

      My problem was that we are a few developers here using wxPython 2.6 / boa 0.4.4, and I were the first one to try to switch to wxPython 2.7 / boa 0.5.2 (although the release is not out). We are working on thousands of line of shared source code and make a heavy use of GenButtons.

      Since Riaan has updated the cvs with the StaticBoxSizers fix, we think we can now use safely boa 0.5.2, so I've just begun to change IDs to ids. Breaking compatibility with wxPython 2.6 will hopefully not be a big problem to us.

      Olivier