Danny Shevitz | 16 Jul 04:34

Re: probable bug in @on_trait_change with delegated lists


> Hmm...might bear some looking into. I'm still not clear what is 
> happening in your app when the notification error occurs. Which trait is 
> being modified, and how? I probably won't have time to look into it 
> today, but will try and do so tomorrow...

I'm out of the office tomorrow, so I won't be able to help again until thursday.

Here's the story.
1) The tree is displayed with a hidden root and is visually empty.
2) I drag an extendable gate off my gate palette onto the empty tree.
3) that's it. The error appears there after this initial append to
the root operation. Visually, the new gate appears on the screen but there is
a subsequent exception.

I am trying to modify the sub_contexts of the root. 

The error is in any handler of the form
@on_trait_change('x:sub_contexts*:y') including x in ['self.info', 'tree', 
'object'] or y in ['','is_terminated',...] as long as it includes :sub_contexts*

the exception is not in the handler. The code can be 'pass' and the error 
appears. The error is caused by the *existence* of the handler, not the handler
code.

The stack frame in fbi is conceptually (bottom first...)
1)trait_listener: handle_list (should be handle_list_item, I think)
1.5) catch change to sub_contexts (lots of callbacks here)
2)node.append_child
3)tree_editor._undoable_append
3)my drop code

this is from memory, so it could be slightly off...

D

Gmane