diff --git a/enable/gadgets/vu_meter.py b/enable/gadgets/vu_meter.py index b15300854..170f0789c 100644 --- a/enable/gadgets/vu_meter.py +++ b/enable/gadgets/vu_meter.py @@ -72,10 +72,10 @@ class VUMeter(Component): _outer_radial_margin = Float(60.0) # The angle (in radians) of the span of the curve axis. - _phi = Property(Float, depends_on=["angle"]) + _phi = Property(Float, observe=["angle"]) # This is the radius of the circular axis (in screen coordinates). - _axis_radius = Property(Float, depends_on=["_phi", "width", "height"]) + _axis_radius = Property(Float, observe=["_phi", "width", "height"]) # --------------------------------------------------------------------- # Trait Property methods diff --git a/enable/primitives/image.py b/enable/primitives/image.py index 7dc2cbfc3..11d24acfd 100644 --- a/enable/primitives/image.py +++ b/enable/primitives/image.py @@ -31,13 +31,13 @@ class Image(Component): data = Array(shape=(None, None, (3, 4)), dtype="uint8") #: the format of the image data (eg. RGB vs. RGBA) - format = Property(Enum("rgb24", "rgba32"), depends_on="data") + format = Property(Enum("rgb24", "rgba32"), observe="data") #: the size-hint for constraints-based layout - layout_size_hint = Property(data, depends_on="data") + layout_size_hint = Property(data, observe="data") #: the image as a C-contiguous ndarray - _image = Property(Array(shape=(None, None, None)), depends_on="data") + _image = Property(Array(shape=(None, None, None)), observe="data") @classmethod def from_file(cls, filename, **traits): diff --git a/enable/savage/compliance/comparator.py b/enable/savage/compliance/comparator.py index ccc7612e8..33d801ea5 100644 --- a/enable/savage/compliance/comparator.py +++ b/enable/savage/compliance/comparator.py @@ -103,7 +103,7 @@ class Comparator(HasTraits): # The currently selected SVG file. current_file = Str() - abs_current_file = Property(depends_on=["current_file"]) + abs_current_file = Property(observe=["current_file"]) # The current XML ElementTree root Element and its XMLTree view model. current_xml = Any() @@ -116,7 +116,7 @@ class Comparator(HasTraits): # The text showing the current mouse coordinates over any of the # components. - mouse_coords = Property(Str, depends_on=["ch_controller.svg_coords"]) + mouse_coords = Property(Str, observe=["ch_controller.svg_coords"]) # Move forward and backward through the list of SVG files. move_forward = Button(">>") diff --git a/enable/text_field.py b/enable/text_field.py index 95e6f522e..5af856878 100644 --- a/enable/text_field.py +++ b/enable/text_field.py @@ -34,7 +34,7 @@ class TextField(Component): # ------------------------------------------------------------------------ # The text to be edited - text = Property(depends_on=["_text_changed"]) + text = Property(observe=["_text_changed"]) # Events that get fired on certain keypresses accept = Event @@ -74,10 +74,10 @@ class TextField(Component): # The max width/height of the displayed text in characters _text_width = Property( - depends_on=["_style", "height"], cached="_height_cache" + observe=["_style", "height"], cached="_height_cache" ) _text_height = Property( - depends_on=["_style", "width"], cached="_width_cache" + observe=["_style", "width"], cached="_width_cache" ) # The x-y position of the cursor in the text diff --git a/enable/tools/drag_tool.py b/enable/tools/drag_tool.py index 7722a5423..3477cba19 100644 --- a/enable/tools/drag_tool.py +++ b/enable/tools/drag_tool.py @@ -62,7 +62,7 @@ class DragTool(BaseTool): # private property to hold the current list of KeySpec instances of the # cancel keys - _cancel_keys = Property(List(KeySpec), depends_on="cancel_keys") + _cancel_keys = Property(List(KeySpec), observe="cancel_keys") # ------------------------------------------------------------------------ # Interface for subclasses diff --git a/kiva/examples/kiva/kiva_explorer.py b/kiva/examples/kiva/kiva_explorer.py index d72543907..2221759e3 100644 --- a/kiva/examples/kiva/kiva_explorer.py +++ b/kiva/examples/kiva/kiva_explorer.py @@ -63,7 +63,7 @@ class ScriptedComponent(Component): #: how long did the last draw take last_draw_time = Float(0.0) - fps_display = Property(Str, depends_on="last_draw_time") + fps_display = Property(Str, observe="last_draw_time") #: compiled code _draw_code = Any