Last change
on this file since 825 was
825,
checked in by jemian, 13 years ago
|
publish the documentation
|
-
Property svn:eol-style set to
native
|
File size:
758 bytes
|
Line | |
---|
1 | .. $Id: handler.rst 824 2012-04-24 20:19:42Z jemian $ |
---|
2 | |
---|
3 | =================================================== |
---|
4 | traits_probe.py : CodeHandler class |
---|
5 | =================================================== |
---|
6 | |
---|
7 | .. code-block:: python |
---|
8 | :linenos: |
---|
9 | |
---|
10 | # TraitsUI Handler class for bound methods |
---|
11 | class CodeHandler ( Handler ): |
---|
12 | |
---|
13 | def connect ( self, info ): |
---|
14 | if len(info.object.name) > 0: |
---|
15 | try: |
---|
16 | if info.object._chid is not None: |
---|
17 | info.object._chid.cancel_callback() |
---|
18 | info.object._chid.disconnect() |
---|
19 | except: |
---|
20 | pass |
---|
21 | info.object._chid = epics.PV( |
---|
22 | str(info.object.name), |
---|
23 | callback=info.object.do_callback |
---|
24 | ) |
---|
25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.