def find_extension(self,node): try: with RunContext(self): a = next(self.g.state_extensions(node)) self.do_state_action(a) except StopIteration: uu.ok_dialog(self.tk,self.root,"State {} is closed.".format(node.id))
def find_extension(self, node): try: with RunContext(self): a = next(self.g.state_extensions(node)) self.do_state_action(a) except StopIteration: uu.ok_dialog(self.tk, self.root, "State {} is closed.".format(node.id))
def do_find(self, pats, gen): sel = self.hlist.info_selection() anchor_addr = sel[0] if len(sel) else None anchor_ev = lookup(self.evs, anchor_addr) if anchor_addr else None res = ev.find(gen(anchor_addr)(self.evs), pats, anchor=anchor_ev) if res == None: uu.ok_dialog(the_ui.tk, self, 'Pattern not found') return a, e = res self.hlist.selection_clear() self.uncover(a) self.hlist.selection_set(a) self.hlist.see(a)
def do_find(self,pats,gen): sel = self.hlist.info_selection() anchor_addr = sel[0] if len(sel) else None anchor_ev = lookup(self.evs,anchor_addr) if anchor_addr else None res = ev.find(gen(anchor_addr)(self.evs),pats,anchor=anchor_ev) if res == None: uu.ok_dialog(the_ui.tk,self,'Pattern not found') return a,e = res self.hlist.selection_clear() self.uncover(a) self.hlist.selection_set(a) self.hlist.see(a)
def ok_dialog(self, msg): uu.ok_dialog(self.tk, self.frame, msg, ans=self.getans())
def ok_dialog(self,msg): uu.ok_dialog(self.tk,self.frame,msg)