Ejemplo n.º 1
0
 def materialize_from_selected(self):
     if hasattr(self,'mark'):
         sorts = [self.lookup_node(x).sort for x in [self.mark,self.current_node]]
         required_sort = ivy_logic.RelationSort(sorts)
         rels = [r for r in self.g.relations if r.sort == required_sort]
         items = [str(r.rel_lit) for r in rels]
         msg = "Materialize this relation from selected node:"
         uu.listbox_dialog(self.tk,self.root,msg,items,command=functools.partial(self.materialize_from_selected_aux,rels))
Ejemplo n.º 2
0
 def listbox_dialog(self,
                    msg,
                    items,
                    command=lambda: None,
                    on_cancel=lambda: None,
                    multiple=False):
     uu.listbox_dialog(self.tk, self.frame, msg, items, command, on_cancel,
                       multiple)
Ejemplo n.º 3
0
 def materialize_from_selected(self):
     if hasattr(self,'mark'):
         sorts = [self.lookup_node(x).sort for x in [self.mark,self.current_node]]
         required_sort = ivy_logic.RelationSort(sorts)
         rels = [r for r in self.g.relations if r.sort == required_sort]
         items = [str(r.rel_lit) for r in rels]
         msg = "Materialize this relation from selected node:"
         uu.listbox_dialog(self.tk,self.root,msg,items,command=functools.partial(self.materialize_from_selected_aux,rels))
Ejemplo n.º 4
0
Archivo: tk_ui.py Proyecto: odedp/ivy
 def listbox_dialog(self, msg, items, command=lambda: None, on_cancel=lambda: None, multiple=False):
     uu.listbox_dialog(self.tk, self.frame, msg, items, command, on_cancel, multiple)