def play_record(self): # assumption: in record tab if not self.record: self.record = Record.load() cm.waiter.record = self.record cm.waiter.add_job('start_playing') self.on_start_playing_record()
def on_open(self): dialog = wx.FileDialog(self, message="Select a record", defaultDir=Record.directory, defaultFile=Record.autosave_filename, wildcard="*" + Record.extension) if dialog.ShowModal() == wx.ID_OK: filename = dialog.GetFilename() directory = dialog.GetDirectory() self.set_record( Record.load(op.join(directory, filename), filename=filename))
def on_open_last(self): if op.exists(Record.autosave_path): self.set_record(Record.load()) else: print("There is no last record")
def open_last_record(self): # TODO: in separate thread self.record = Record.load() print("last record loaded")
def stop(self): self._stop() self.callback(Record(actions=self.actions)) print("recorder ended.")
def open_last_record(self): if op.exists(Record.autosave_path): self.record = Record.load() else: print("There is no autosaved record!")
def open_callback(path): record = Record.load(path=path) dialog.dismiss() self.record = record