Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apptools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
__version__ = 'not-built'

__requires__ = [
'traitsui',
'configobj',
]
19 changes: 13 additions & 6 deletions apptools/naming/trait_defs/naming_traits.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
from traits.trait_base \
import class_of, get_module_name

from traitsui.api \
import DropEditor
try:
from traitsui.api \
import DropEditor
except ImportError:
pass

from apptools.naming.api \
import Binding
Expand Down Expand Up @@ -101,11 +104,15 @@ def validate_failed ( self, object, name, value ):

def get_editor ( self, trait ):
if self.editor is None:
from traitsui.api import DropEditor
try:
from traitsui.api import DropEditor

self.editor = DropEditor( klass = self.aClass,
binding = True,
readonly = False )
except ImportError:
pass

self.editor = DropEditor( klass = self.aClass,
binding = True,
readonly = False )
return self.editor

def post_setattr ( self, object, name, value ):
Expand Down