wxglade_hmi/wxglade_hmi.py
changeset 1053 b0ac30ba7eaf
parent 1014 e2f7d6c95db0
child 1062 fd7c9a7cf882
equal deleted inserted replaced
1052:fa7c5034c1d2 1053:b0ac30ba7eaf
    93     %(name)s = %(class)s(None)
    93     %(name)s = %(class)s(None)
    94     %(name)s.Bind(wx.EVT_CLOSE, OnCloseFrame)
    94     %(name)s.Bind(wx.EVT_CLOSE, OnCloseFrame)
    95     %(name)s.Show()
    95     %(name)s.Show()
    96 """ % {"name": x[0], "class": x[1]},
    96 """ % {"name": x[0], "class": x[1]},
    97                              hmi_frames.items())),
    97                              hmi_frames.items())),
    98        "cleanup": "\n    ".join(map(lambda x:"%s.Destroy()" % x, hmi_frames.keys()))})
    98        "cleanup": "\n    ".join(map(lambda x:"if %s is not None: %s.Destroy()" % (x,x), hmi_frames.keys()))})
    99         runtimefile.close()
    99         runtimefile.close()
   100         
   100         
   101         return [], "", False, ("runtime_%s.py"%location_str, file(runtimefile_path,"rb"))
   101         return [], "", False, ("runtime_%s.py"%location_str, file(runtimefile_path,"rb"))
   102 
   102 
   103     def _editWXGLADE(self):
   103     def _editWXGLADE(self):