def desdeHasta(self, titulo, desde, hasta): liGen = [(None, None)] config = FormLayout.Casillabox(_("From square")) liGen.append((config, desde)) config = FormLayout.Casillabox(_("To square")) liGen.append((config, hasta)) resultado = FormLayout.fedit(liGen, title=titulo, parent=self) if resultado: resp = resultado[1] self.ultDesde = desde = resp[0] self.ultHasta = hasta = resp[1] return desde, hasta else: return None, None
def desdeHasta(self, titulo, from_sq, to_sq): li_gen = [(None, None)] config = FormLayout.Casillabox(_("From square")) li_gen.append((config, from_sq)) config = FormLayout.Casillabox(_("To square")) li_gen.append((config, to_sq)) resultado = FormLayout.fedit(li_gen, title=titulo, parent=self) if resultado: self.ponSiGrabar() resp = resultado[1] self.ultDesde = from_sq = resp[0] self.ultHasta = to_sq = resp[1] return from_sq, to_sq else: return None, None