In the ControlPanel
class, you have created two different instances of Keithley3706ASettings
, namely keithley3706Asettings
and k3706A_settings
. If I delete the latter, and replace the use of k3706A_settings
with keithley3706Asettings
, it works. Here's my version (with references to the 2430 device removed, the k3706A
trait declared as an Instance
of Keithley3706A
, and a few other irrelevant UI changes):
class ControlPanel(HasTraits):
keithley3706Asettings = Instance(Keithley3706A_module.Keithley3706ASettings, ())
k3706A = Instance(Keithley3706A_module.Keithley3706A, ())
start = Button("Start Measurements")
clear_3706A_display = Button("Clear K3706A Display")
view = View(UItem('start'),
UItem('clear_3706A_display'),
Item('keithley3706Asettings', style='simple'))
def _start_fired(self):
print "hello %s" % self.keithley3706Asettings.display
self.k3706A.message(self.keithley3706Asettings.display)
def _clear_3706A_display_fired(self):
self.k3706A.clear()