I'm using envisage workbance and I want to get the service in the Handler.
In the _tcp_send_changed
function how can I get the services. In the plugin there is the self.application.get_service(....)
but here how can I reach them?
UPDATED
This is my view
class MCLidarGUIView( HasTraits ):
traits_ui_view = View(
VGroup(
HGroup(
Item( 'lidar_list',
show_label = False,
editor = TabularEditor(
show_titles = False,
selected = 'selected',
editable = False,
multi_select = True,
adapter = LidarAdapter()
),
),
),
Item(
"lidars_command"
),
HGroup(
Item( 'handler.tcp_send',
show_label = False,
editor = ButtonEditor( label = "TCP:Send" )
),
)
),
id = 'forwind.lidarapi.giuview',
resizable = True,
handler = MCLidarActions()
)
lidar_list = [LidarObject( lidar_name = "No Connected Lidar" )]
lidars_command = ''
and this is my handler:
class MCLidarActions( Handler ):
tcp_send = Event
def object__updated_changed( self, info ):
print info;
pass;
def _tcp_send_changed( self ):
print( " info" )
class MyHandler(Handler):
def __init__(self, application, **traits):
Handler.__init__(self, **traits)
self.application = application
...