(self, triplet, func)
| 211 | seq, handler))) |
| 212 | |
| 213 | def bind(self, triplet, func): |
| 214 | if triplet[2] not in self.bindedfuncs: |
| 215 | self.bindedfuncs[triplet[2]] = [[] for s in _states] |
| 216 | for s in _states: |
| 217 | lists = [ self.bindedfuncs[detail][i] |
| 218 | for detail in (triplet[2], None) |
| 219 | for i in _state_subsets[s] ] |
| 220 | handler = self.__create_handler(lists, self.type, |
| 221 | _state_codes[s]) |
| 222 | seq = "<%s%s-%s>"% (_state_names[s], self.typename, triplet[2]) |
| 223 | self.handlerids.append((seq, self.widget.bind(self.widgetinst, |
| 224 | seq, handler))) |
| 225 | doit = lambda: self.bindedfuncs[triplet[2]][triplet[0]].append(func) |
| 226 | if not self.ishandlerrunning: |
| 227 | doit() |
| 228 | else: |
| 229 | self.doafterhandler.append(doit) |
| 230 | |
| 231 | def unbind(self, triplet, func): |
| 232 | doit = lambda: self.bindedfuncs[triplet[2]][triplet[0]].remove(func) |
nothing calls this directly
no test coverage detected