View Single Post
  #10  
Old 06-12-2008, 05:29 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The show method just sets the dialog visible, waits for either the accept or cancel button to be pressed, then hides the dialog. If you do not want to use a task, then you can manually perform these steps. Here is the code for the show command:
Code:
def show(self):
	"""Create task that displays dialog"""
	
	#Show dialog
	self.visible(1)
		
	#Yield until accept or cancel button is released
	d = viz.Data()
	yield viztask.waitButtonUp([self.accept,self.cancel],d)
		
	#Save whether the dialog was accepted
	self.accepted = d.button is self.accept
		
	#Hide dialog
	self.visible(0)
Reply With Quote