(self, master, name,
destroy_physically=1, check_intermediate=1)
| 421 | of this)""" |
| 422 | |
| 423 | def __init__(self, master, name, |
| 424 | destroy_physically=1, check_intermediate=1): |
| 425 | if check_intermediate: |
| 426 | path = master._subwidget_name(name) |
| 427 | try: |
| 428 | path = path[len(master._w)+1:] |
| 429 | plist = path.split('.') |
| 430 | except: |
| 431 | plist = [] |
| 432 | |
| 433 | if not check_intermediate: |
| 434 | # immediate descendant |
| 435 | TixWidget.__init__(self, master, None, None, {'name' : name}) |
| 436 | else: |
| 437 | # Ensure that the intermediate widgets exist |
| 438 | parent = master |
| 439 | for i in range(len(plist) - 1): |
| 440 | n = '.'.join(plist[:i+1]) |
| 441 | try: |
| 442 | w = master._nametowidget(n) |
| 443 | parent = w |
| 444 | except KeyError: |
| 445 | # Create the intermediate widget |
| 446 | parent = TixSubWidget(parent, plist[i], |
| 447 | destroy_physically=0, |
| 448 | check_intermediate=0) |
| 449 | # The Tk widget name is in plist, not in name |
| 450 | if plist: |
| 451 | name = plist[-1] |
| 452 | TixWidget.__init__(self, parent, None, None, {'name' : name}) |
| 453 | self.destroy_physically = destroy_physically |
| 454 | |
| 455 | def destroy(self): |
| 456 | # For some widgets e.g., a NoteBook, when we call destructors, |
nothing calls this directly
no test coverage detected