bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent) | def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent) | 29,200 |
def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent) | def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent) | 29,201 |
def OnOpen(self, event, curdir='.'): fn = self.openFileDlg(curdir=curdir) if fn: self.openOrGotoModule(fn) self.explorerStore.recentFiles.add(fn) | def OnOpen(self, event, curdir='.'): fn = self.openFileDlg(curdir=curdir) if fn: self.openOrGotoModule(fn) self.explorerStore.recentFiles.add(fn) | 29,202 |
def __init__(self, propEditor, value): self.propEditor = propEditor self.editorCtrl = None self.wID = NewId() self.value = value | def __init__(self, propEditor, value): self.propEditor = propEditor self.editorCtrl = None self.wID = wxNewId() self.value = value | 29,203 |
def setupArgs(self, ctrlName, params, dontEval): """ Create a dictionary of parameters for the constructor of the control from a dictionary of string/source parameters. Catches design time parameter overrides. """ | def setupArgs(self, ctrlName, params, dontEval): """ Create a dictionary of parameters for the constructor of the control from a dictionary of string/source parameters. Catches design time parameter overrides. """ | 29,204 |
def destroy(self): print 'DESTROY InspectableObjectCollectionView', self.__class__.__name__ del self.controllerView del self.inspector for objval in self.objects.values(): objval[0].destroy() for coll in self.collEditors.values(): coll.destroy() del self.collEditors del self.objects del self.senderMapper EditorViews.Ed... | def destroy(self): del self.controllerView del self.inspector for objval in self.objects.values(): objval[0].destroy() for coll in self.collEditors.values(): coll.destroy() del self.collEditors del self.objects del self.senderMapper EditorViews.EditorView.destroy(self) | 29,205 |
def buildParentRelationship(self): """ Build a nested dictionary of key = name, value = dict pairs describing parental relationship. Assuming parents are created before children """ parRel = {} parRef = {} for ctrl in self.objectOrder: ce = self.objects[ctrl] if ce[2] is None: parRel[ctrl] = {} parRef[ctrl] = parRel[c... | def buildParentRelationship(self): """ Build a nested dictionary of key = name, value = dict pairs describing parental relationship. Assuming parents are created before children """ parRel = {} parRef = {} for ctrl in self.objectOrder: ce = self.objects[ctrl] if ce[2] is None: parRel[ctrl] = {} parRef[ctrl] = parRel[c... | 29,206 |
def initObjectsAndCompanions(self, creators, objColl, dependents, depLinks): collDeps = {} for ctrl in creators: self.initObjCreator(ctrl) self.initObjProps(objColl.propertiesByName, ctrl.comp_name, ctrl, dependents, depLinks) self.initObjColls(objColl.collectionsByName, ctrl.comp_name, ctrl, collDeps) self.initObjEvts... | def initObjectsAndCompanions(self, creators, objColl, dependents, depLinks): collDeps = {} for ctrl in creators: self.initObjCreator(ctrl) self.initObjProps(objColl.propertiesByName, ctrl.comp_name, ctrl, dependents, depLinks) self.initObjColls(objColl.collectionsByName, ctrl.comp_name, ctrl, collDeps) self.initObjEvts... | 29,207 |
def initObjProps(self, props, name, creator, dependents, depLinks): """ Initialise property list by evaluating 1st parameter and calling prop's setter with it. Also associate companion name with prop parse objs """ if props.has_key(name): comp, ctrl = self.objects[name][0:2] # initialise live component's... | definitObjProps(self,props,name,creator,dependents,depLinks):"""Initialisepropertylistbyevaluating1stparameterandcallingprop'ssetterwithit.Alsoassociatecompanionnamewithpropparseobjs"""ifprops.has_key(name):comp,ctrl=self.objects[name][0:2]#initialiselivecomponent'sproperiesforpropinprops[name]:prop.prop_name=comp.getP... | 29,208 |
def checkAndAddDepLink(self, ctrlName, prop, dependentProps, deps, depLinks, definedCtrls): if prop.prop_name in dependentProps: # Don't postpone if target ctrl already defined target = Utils.ctrlNameFromSrcRef(prop.params[0]) if target not in definedCtrls: self.addDepLink(prop, ctrlName, deps, depLinks) return true re... | def checkAndAddDepLink(self, ctrlName, prop, dependentProps, deps, depLinks, definedCtrls): if prop.prop_name in dependentProps: # Don't postpone if target ctrl already definedrefs = self.getRefsFromProp(prop) allCtrlsDefined = len(refs) > 0 for ref in refs: if ref not in definedCtrls: allCtrlsDefined = false if not ... | 29,209 |
def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop, otherRefs in depLinks[ctrlName]: for oRf in otherRefs: if not oRf in self.objectOrder: break else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | 29,210 |
def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ctrl = self.objects[prop.comp_name][1] if len(prop.params) == 1: if ctrlName == '': value = self else: ord, objs = self.model.allO... | 29,211 |
def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: refs = [] for param in prop.params:... | 29,212 |
def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | 29,213 |
def addDepLink(self, prop, name, dependents, depLinks): if not dependents.has_key(name): dependents[name] = [] dependents[name].append(prop) | def addDepLink(self, prop, name, dependents, depLinks): if not dependents.has_key(name): dependents[name] = [] dependents[name].append(prop) | 29,214 |
def renameCtrl(self, oldName, newName): """ Rename a control and update all its properties and events.""" | defcompanion.renameCtrlRefs(oldName, newName) renameCtrl(self,companion.renameCtrlRefs(oldName, newName) oldName,companion.renameCtrlRefs(oldName, newName) newName):companion.renameCtrlRefs(oldName, newName) """companion.renameCtrlRefs(oldName, newName) Renamecompanion.renameCtrlRefs(oldName, newName) acompanion.... | 29,215 |
def renameCtrl(self, oldName, newName): """ Rename a control and update all its properties and events.""" | def renameCtrl(self, oldName, newName): """ Rename a control and update all its properties and events.""" | 29,216 |
def saveCtrls(self, definedCtrls): """ Replace current source of method in collectionMethod with values from constructors, properties and events. """ | def saveCtrls(self, definedCtrls): """ Replace current source of method in collectionMethod with values from constructors, properties and events. """ | 29,217 |
output.insert(0, ' def %s(%s):'% (self.collectionMethod, self.collectionParams)) | output.insert(0, ' def %s(%s):'% (self.collectionMethod, self.collectionParams)) | 29,218 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,219 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,220 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,221 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | ifline[:8]=='def':meth=line[8:string.find(line,'(',9)]currMeth=[meth]methList.append(currMeth) | 29,222 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,223 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,224 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,225 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,226 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,227 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,228 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,229 |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 29,230 |
def refreshContainment(self, selectName = None): parRelations, parReference = self.buildParentRelationship() self.inspector.containment.refreshCtrl(self.model.main, parRelations, self) if selectName is not None: self.inspector.containment.selectName(selectName) return parRelations, parReference | def refreshContainment(self, selectName = None): """ Rebuild parent tree and optionally select given control """ parRelations, parReference = self.buildParentRelationship() self.inspector.containment.refreshCtrl(self.model.main, parRelations, self) if selectName is not None: self.inspector.containment.selectName(select... | 29,231 |
def getObjectsOfClass(self, theClass): results = {} for objName in self.objects.keys(): if issubclass(self.objects[objName][1].__class__, theClass): results['self.'+objName] = self.objects[objName][1] return results | def getObjectsOfClass(self, theClass): results = {} for objName in self.objects.keys(): if issubclass(self.objects[objName][1].__class__, theClass): if objName: results['self.'+objName] = self.objects[objName][1] else: results['self'] = self.objects[objName][1] return results def getObjectsOfClassWithParent(self, theC... | 29,232 |
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | 29,233 |
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | defif Preferences.drawDesignerGrid: EVT_PAINT(self, self.OnPaint) self.drawGridMethods = {'lines' : self.drawGrid_intersectingLines, 'dots' : self.drawGrid_dots, 'bitmap': self.drawGrid_bitmap, 'grid' : self.drawGrid_grid} __init__(self,if Preferences.drawDesignerGrid: EVT_PAINT(self, self.OnPaint) self.drawGridMe... | 29,234 |
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | 29,235 |
def refreshCtrl(self): if self.destroying: return | def refreshCtrl(self): if self.destroying: return | 29,236 |
def initSelection(self): self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | def initSelection(self): self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | 29,237 |
def CtrlAnchored(self, ctrl): result = (ctrl == self) | def CtrlAnchored(self, ctrl): result = (ctrl == self) | 29,238 |
def getAllObjects(self):#, theClass): results = InspectableObjectCollectionView.getAllObjects(self) for objName in self.dataView.objects.keys(): if objName: results['self.'+objName] = self.dataView.objects[objName][1] else: results['self'] = self.dataView.objects[objName][1] return results | def getAllObjects(self):#, theClass): results = InspectableObjectCollectionView.getAllObjects(self) for objName in self.dataView.objects.keys(): if objName: results['self.'+objName] = self.dataView.objects[objName][1] else: results['self'] = self.dataView.objects[objName][1] return results | 29,239 |
def deleteCtrl(self, name, parentRef = None): ctrlInfo = self.objects[name] if ctrlInfo[1] == self: wxMessageBox("Can't delete frame") return parRel = None # build relationship, this will only happen for the first call if not parentRef: # select parent so long, pretty soon won't be able to ask who # the parent is paren... | def self.notifyAction(ctrlInfo[0], 'delete') deleteCtrl(self, self.notifyAction(ctrlInfo[0], 'delete') name, self.notifyAction(ctrlInfo[0], 'delete') parentRef self.notifyAction(ctrlInfo[0], 'delete') = self.notifyAction(ctrlInfo[0], 'delete') None): self.notifyAction(ctrlInfo[0], 'delete') ctrlInfo ... | 29,240 |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else: parent = ctrl.GetParent() # Workaround toolbar offset bug tbOffset = 0 if parent == self: tb = self.GetToolBar() if tb: tbOffset = tb.GetSize().y * -1 | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else: parent = ctrl.GetParent() # Workaround toolbar offset bug tbOffset = 0 if parent == self: tb = self.GetToolBar() if tb: tbOffset = tb.GetSize().y * -1 | 29,241 |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else: parent = ctrl.GetParent() # Workaround toolbar offset bug tbOffset = 0 if parent == self: tb = self.GetToolBar() if tb: tbOffset = tb.GetSize().y * -1 | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else: parent = ctrl.GetParent() # Workaround toolbar offset bug tbOffset = 0 if parent == self: tb = self.GetToolBar() if tb: tbOffset = tb.GetSize().y * -1 | 29,242 |
def assureSingleSelection(self): if not self.selection: self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | def assureSingleSelection(self): if not self.selection: self.selection = SelectionTags.SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | 29,243 |
def OnMouseOver(self, event): if event.Dragging(): pos = event.GetPosition() ctrl = self.senderMapper.getObject(event) | def OnMouseOver(self, event): if event.Dragging(): pos = event.GetPosition() ctrl = self.senderMapper.getObject(event) | 29,244 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,245 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,246 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,247 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,248 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,249 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,250 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,251 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,252 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,253 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,254 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,255 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | defOnControlSelect(self,event):"""Controlisclicked.Eitherselectitoraddcontrolfrompalette"""ctrl=self.senderMapper.getObject(event) | 29,256 |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 29,257 |
def OnControlRelease(self, event): if self.selection: self.selection.moveRelease() elif self.multiSelection: for sel in self.multiSelection: sel.moveRelease() self.mainMultiDrag = None event.Skip() | def OnControlRelease(self, event): if self.selection: self.selection.moveRelease() elif self.multiSelection: for sel in self.multiSelection: sel.moveRelease() self.mainMultiDrag = None event.Skip() | 29,258 |
def OnControlResize(self, event): try: if event.GetId() == self.GetId(): self.selection.selectCtrl(self, self.companion) | def OnControlResize(self, event): try: if event.GetId() == self.GetId(): self.selection.selectCtrl(self, self.companion) | 29,259 |
def OnControlResize(self, event): try: if event.GetId() == self.GetId(): self.selection.selectCtrl(self, self.companion) | def OnControlResize(self, event): try: if event.GetId() == self.GetId(): self.selection.selectCtrl(self, self.companion) | 29,260 |
def OnControlDelete(self, event): ctrls = [] if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) #map(self.deleteCtrl, ctrls) for ctrlName in ctrls: self.deleteCtrl(ctrlName) | def OnControlDelete(self, event): ctrls = [] if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) #map(self.deleteCtrl, ctrls) for ctrlName in ctrls: self.deleteCtrl(ctrlName) | 29,261 |
def OnCutSelected(self, event): if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) | def OnCutSelected(self, event): if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) | 29,262 |
def OnCopySelected(self, event): if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) | def OnCopySelected(self, event): if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) | 29,263 |
def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | 29,264 |
def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | 29,265 |
def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | 29,266 |
def handleBrwsRuntimeGlobals(self, word, currLineNo): # The current runtime values of the shell is inspected # as well as the wxPython namespaces if self.model.editor.shell: shellLocals = self.model.editor.shell.getShellLocals() else: shellLocals = {} | def handleBrwsRuntimeGlobals(self, word, currLineNo): # The current runtime values of the shell is inspected # as well as the wxPython namespaces if self.model.editor.shell: shellLocals = self.model.editor.shell.getShellLocals() else: shellLocals = {} | 29,267 |
def __init__(self, parent, model): wxID_PYTHONSOURCEDIFFVIEW = wx.NewId() | def __init__(self, parent, model): wxID_PYTHONSOURCEDIFFVIEW = wx.NewId() | 29,268 |
def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:9]=='<a href="': idx = string.find(line, '">') if idx != -1: href = line[9:idx] name = line[idx+2:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:8]=='<a href=': idx = string.find(line, '>') if idx != -1: href = line[9:idx] name = line[idx+2:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | 29,269 |
def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:9]=='<a href="': idx = string.find(line, '">') if idx != -1: href = line[9:idx] name = line[idx+2:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:9]=='<a href="': idx = string.find(line, '">') if idx != -1: href = line[9:idx-1] name = line[idx+1:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | 29,270 |
def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:9]=='<a href="': idx = string.find(line, '">') if idx != -1: href = line[9:idx] name = line[idx+2:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:9]=='<a href="': idx = string.find(line, '">') if idx != -1: href = line[9:idx] name = line[idx+2:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | 29,271 |
def insertCodeBlock(self, text): cp = self.GetCurrentPos() ln = self.LineFromPosition(cp) indent = cp - self.PositionFromLine(ln) lns = text.split(self.eol) # XXX adapt for tab mode text = (self.eol+indent*' ').join(lns) | def insertCodeBlock(self, text): cp = self.GetCurrentPos() ln = self.LineFromPosition(cp) indent = cp - self.PositionFromLine(ln) lns = text.split('\n') # XXX adapt for tab mode text = (self.eol+indent*' ').join(lns) | 29,272 |
def isDir(self, path): return path[-1] == '/' | def isDir(self, path): return path[-1] == '/' | 29,273 |
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass, model.specialAttrs) if model.modelIdentifier == 'Dialog': style = wxRESIZE_BORDER | wxCAPTION | wxSYSTEM_MENU else: style = wxDEFAULT_FRAM... | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass, model.specialAttrs) if model.modelIdentifier == 'Dialog': style = wxRESIZE_BORDER | wxCAPTION | wxSYSTEM_MENU else: style = wxDEFAULT_FRAM... | 29,274 |
def saveCtrls(self, definedCtrls, module=None): """ Generate source code for Designer """ | def saveCtrls(self, definedCtrls, module=None): """ Generate source code for Designer """ | 29,275 |
def renameFrame(self, oldName, newName): """ Hook that also updates the Model and window ids of the Frame when it's name changes """ self.SetName(newName) | def renameFrame(self, oldName, newName): """ Hook that also updates the Model and window ids of the Frame when it's name changes """ self.SetName(newName) | 29,276 |
def refreshModel(self): """ Update model with streamed out controls """ # Make source r/w self.model.views['Source'].disableSource(false) | def refreshModel(self): """ Update model with streamed out controls """ # Make source r/w self.model.views['Source'].disableSource(false) | 29,277 |
def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): dataResults['self.'+objName] = self.... | def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the other views """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): dataResults['self.'+objName] = se... | 29,278 |
def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): dataResults['self.'+objName] = self.... | def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) otherResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): dataResults['self.'+objName] = self... | 29,279 |
def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): dataResults['self.'+objName] = self.... | def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): otherResults['self.'+objName] = self... | 29,280 |
def getAllObjects(self): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getAllObjects(self) for objName in self.dataView.objects.keys(): results[Utils.srcRefFromCtrlName(objName)] = \ self.dataView.objects[objName][1] return results | def getAllObjects(self): """ Overridden to also add objects from other views """ results = InspectableObjectView.getAllObjects(self) for objName in self.dataView.objects.keys(): results[Utils.srcRefFromCtrlName(objName)] = \ self.dataView.objects[objName][1] return results | 29,281 |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos | 29,282 |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. ""... | 29,283 |
def relayoutCtrl(self, ctrl): self.forceResize = true # cleared by the event evt = wxSizeEvent(ctrl.GetSize()) evt.SetId(ctrl.GetId()) wxPostEvent(ctrl, evt) | def relayoutCtrl(self, ctrl): self.forceResize = true # cleared by the event evt = wxSizeEvent(ctrl.GetSize()) evt.SetId(ctrl.GetId()) wxPostEvent(ctrl, evt) | 29,284 |
def updateAutoCreateImports(self, oldName, newName): """ Rename module in import list. | def updateAutoCreateImports(self, oldName, newName): """ Rename module in import list. | 29,285 |
def initObjProps(self, props, name, creator, dependents, depLinks): """ Initialise property list by evaluating 1st parameter and calling prop's setter with it. Also associate companion name with prop parse objs """ | def initObjProps(self, props, name, creator, dependents, depLinks): """ Initialise property list by evaluating 1st parameter and calling prop's setter with it. Also associate companion name with prop parse objs """ | 29,286 |
def __init__(self, data, name, main, editor, saved, app = None): ClassModel.__init__(self, data, name, main, editor, saved, app) self.designerTool = None self.specialAttrs = [] | def __init__(self, data, name, main, editor, saved, app = None): ClassModel.__init__(self, data, name, main, editor, saved, app) self.designerTool = None self.specialAttrs = [] | 29,287 |
def new(self, params): """ Create a new frame module """ paramLst = [] for param in params.keys(): paramLst.append('%s = %s'%(param, params[param])) paramStr = 'self, ' + string.join(paramLst, ', ') | def new(self, params): """ Create a new frame module """ paramLst = [] for param in params.keys(): paramLst.append(Preferences.cgKeywordArgFormat %{'keyword': param, 'value': params[param]}) paramStr = 'self, ' + string.join(paramLst, ', ') | 29,288 |
def new(self, params): """ Create a new frame module """ paramLst = [] for param in params.keys(): paramLst.append('%s = %s'%(param, params[param])) paramStr = 'self, ' + string.join(paramLst, ', ') | def new(self, params): """ Create a new frame module """ paramLst = [] for param in params.keys(): paramLst.append('%s = %s'%(param, params[param])) paramStr = 'self, ' + string.join(paramLst, ', ') | 29,289 |
def new(self, params): """ Create a new frame module """ paramLst = [] for param in params.keys(): paramLst.append('%s = %s'%(param, params[param])) paramStr = 'self, ' + string.join(paramLst, ', ') | defnew(self,params):"""Createanewframemodule"""paramLst=[]forparaminparams.keys():paramLst.append('%s=%s'%(param,params[param]))paramStr='self,'+string.join(paramLst,',') | 29,290 |
e.g. def __init__(self, parent, myFrameCaption): self.frameCaption = 'Design time frame caption' self.frameCaption = myFrameCaption self._init_ctrls(parent) | e.g. def __init__(self, parent, myFrameCaption): self.frameCaption = 'Design time frame caption' self.frameCaption = myFrameCaption self._init_ctrls(parent) | 29,291 |
e.g. def __init__(self, parent, myFrameCaption): self.frameCaption = 'Design time frame caption' self.frameCaption = myFrameCaption self._init_ctrls(parent) | e.g. def __init__(self, parent, myFrameCaption): self.frameCaption = 'Design time frame caption' self.frameCaption = myFrameCaption self._init_ctrls(parent) | 29,292 |
def readComponents(self): """ Setup object collection dict by parsing all designer controlled methods """ module = self.getModule() # Parse all _init_* methods self.objectCollections = {} if module.classes.has_key(self.main): main = module.classes[self.main] | def readComponents(self): """ Setup object collection dict by parsing all designer controlled methods """ module = self.getModule() # Parse all _init_* methods self.objectCollections = {} if module.classes.has_key(self.main): main = module.classes[self.main] | 29,293 |
def readComponents(self): """ Setup object collection dict by parsing all designer controlled methods """ module = self.getModule() # Parse all _init_* methods self.objectCollections = {} if module.classes.has_key(self.main): main = module.classes[self.main] | def readComponents(self): """ Setup object collection dict by parsing all designer controlled methods """ module = self.getModule() # Parse all _init_* methods self.objectCollections = {} if module.classes.has_key(self.main): main = module.classes[self.main] | 29,294 |
def removeWindowIds(self, colMeth): """ Remove a method's corresponding window ids from the source code """ # find windowids in source winIdIdx = -1 reWinIds = re.compile(srchWindowIds % colMeth) module = self.getModule() for idx in range(len(module.source)): match = reWinIds.match(module.source[idx]) if match: del mod... | def removeWindowIds(self, colMeth): """ Remove a method's corresponding window ids from the source code """ # find windowids in source winIdIdx = -1 reWinIds = re.compile(sourceconst.srchWindowIds % colMeth) module = self.getModule() for idx in range(len(module.source)): match = reWinIds.match(module.source[idx]) if ma... | 29,295 |
def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | 29,296 |
def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | 29,297 |
def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | 29,298 |
def update(self): ClassModel.update(self) | defupdate(self):ClassModel.update(self) | 29,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.