wxWizard code in wxPython Demo, missing feature?

Stefano Bartaletti s.bartaletti at dyemagic.com
Thu Jul 12 05:22:14 PDT 2007


As declared in class SkipNextPage, GetNext() function is like this:

<code>
	def GetNext(self):
		"""If the checkbox is set then return the next page's next page"""
		next = self.next
		if self.cb.GetValue():
			next = next.GetNext()
		return next
</code>

In case of a sequence 1-2-3-4 where 2 is the SkipNextPage, I think it would be 
nice if page returned dynamically to page 2 or 3 depending on choice, so I 
changed it into

<code>
	def GetNext(self):
		"""If the checkbox is set then return the next page's next page"""
		if self.cb.GetValue():
			self.next.GetNext().SetPrev(self)
			return self.next.GetNext()
		else:
			self.next.GetNext().SetPrev(self.next)
			return self.next
</code>

What do you think?

-- 
Cordialmente

Stefano Bartaletti
Responsabile Software

G.Tosi Spa Tintoria

Skype account: stefano.bartaletti
ICQ contact  : 1271960

Viale dell'Industria 61
21052 Busto Arsizio (VA)

Tel. +39 0331 34 48 11
Fax  +39 0331 35 21 23 




More information about the wxpython-users mailing list