def __init__(self, **traits): """Initialise the object.""" # We intentionally don't want to call Editor.__init__ here as # GroupEditor does its own thing. However, we still want Traits # machinery to be set up properly. HasPrivateTraits.__init__(self, **traits) self.trait_set(**traits)
def __init__(self, x=None, y=None, **traits): self.initialized = False self._use_nans = False self._use_block = False self._x = None self._y = None if x is not None and y is not None: self.set_xy(x, y) HasPrivateTraits.__init__(self, **traits)
def __init__(self, x=None, y=None, **traits): self.initialized = False self._use_nans = False self._use_block = False self._x = None self._y = None if x is not None and y is not None: self.set_xy(x, y) HasPrivateTraits.__init__(self, **traits)
def __init__ ( self, parent, **traits ): """ Initializes the editor object. """ HasPrivateTraits.__init__( self, **traits ) try: self.old_value = getattr( self.object, self.name ) except AttributeError: # Getting the attribute will fail for 'Event' traits: self.old_value = Undefined # Synchronize the application invalid state status with the editor's: self.sync_value( self.factory.invalid, 'invalid', 'from' )
def __init__ ( self, parent, **traits ): """ Initializes the editor object. """ HasPrivateTraits.__init__( self, **traits ) try: self.old_value = getattr( self.object, self.name ) except AttributeError, ex: if ex.args[0].endswith("instance is an 'event', which is write only.") or self.name == 'spring' : # Getting the attribute will fail for 'Event' traits: self.old_value = Undefined else : raise
def __init__(self, parent, **traits): """ Initializes the editor object. """ HasPrivateTraits.__init__(self, **traits) try: self.old_value = getattr(self.object, self.name) except AttributeError: ctrait = self.object.base_trait(self.name) if ctrait.type == 'event' or self.name == 'spring': # Getting the attribute will fail for 'Event' traits: self.old_value = Undefined else: raise # Synchronize the application invalid state status with the editor's: self.sync_value(self.factory.invalid, 'invalid', 'from')
def __init__(self, parent, **traits): """ Initializes the editor object. """ HasPrivateTraits.__init__(self, **traits) try: self.old_value = getattr(self.object, self.name) except AttributeError: ctrait = self.object.base_trait(self.name) if ctrait.type == "event" or self.name == "spring": # Getting the attribute will fail for 'Event' traits: self.old_value = Undefined else: raise # Synchronize the application invalid state status with the editor's: self.sync_value(self.factory.invalid, "invalid", "from")
def __init__(self, *args, **traits): """ Initializes the factory object. """ HasPrivateTraits.__init__(self, **traits) self.init(*args)
def __init__(self, **traits): # XXX Why does this need to be an Editor subclass? -- CJW HasPrivateTraits.__init__(self, **traits)
def __init__ ( self, *args, **traits ): """ Initializes the factory object. """ HasPrivateTraits.__init__( self, **traits ) self.init( *args )
def __init__(self, parent, **traits): """ Initializes the editor object. """ HasPrivateTraits.__init__(self, **traits) self.old_value = Undefined
def __init__(self, **traits): # XXX Why does this need to be an Editor subclass? -- CJW HasPrivateTraits.__init__(self, **traits)
def __init__(self, parent, **traits): """ Initializes the editor object. """ HasPrivateTraits.__init__(self, **traits) self.old_value = Undefined