def writeRoutineStartCode(self, buff): inits = getInitVals(self.params, 'PsychoPy') BaseVisualComponent.writeRoutineStartCode(self, buff) code = ( "# clear any previous roi data\n" "%(name)s.reset()\n" ) buff.writeIndentedLines(code % inits)
def writeRoutineStartCode(self, buff): # Give alert if in the same routine as a Keyboard component if self.params['editable'].val: routine = self.exp.routines[self.parentName] for sibling in routine: if isinstance(sibling, KeyboardComponent): alert(4405, strFields={ 'textbox': self.params['name'], 'keyboard': sibling.params['name'] }) code = ("%(name)s.reset()") buff.writeIndentedLines(code % self.params) BaseVisualComponent.writeRoutineStartCode(self, buff)
def writeRoutineStartCodeJS(self, buff): BaseVisualComponent.writeRoutineStartCode(self, buff) code = ("%(name)s.reset()") buff.writeIndentedLines(code % self.params)