Ed:  When you clicked the cancel button, did it return False?  Also, did 
the cancel button take focus when you clicked on it?

I ran this from the command shell cmd.  There is an hour glass the whole 
time it is running and clicking on the cancel button has no affect.  I 
made the modifications you suggested.

Jeff

Jeff Johnson
[EMAIL PROTECTED]
SanDC, Inc.
623-582-0323
Fax 623-869-0675

Ed Leafe wrote:
> On Nov 9, 2007, at 7:03 PM, Jeff Johnson wrote:
> 
>> I was experimenting with the wx.ProgressDialog and ran into a problem
>> that I have had with FoxPro.  You can't click the cancel button so  
>> that
>> .Update() returns false as advertised
> 
>       I think the docs are wrong: Update() doesn't return a bool; it  
> returns a 2-tuple containing bools. When the dialog starts, I see  
> Update() returning (True, False), and after clicking Cancel, I see  
> (False, False). With that knowledge, I modified your code and now  
> this works as expected:
> 
>       while keepGoing and (count < progressMax):
>               count += 1
>               wx.Sleep(1)
>               resp = dialog.Update(count)
>               keepGoing = resp[0]
>               # tried break and setting count to progressMax
>               # print always returned (True, False)
>               print keepGoing
>               
>       dialog.Destroy()
> 
> 
> -- Ed Leafe
> -- http://leafe.com
> -- http://dabodev.com
> 
> 
> 
> 
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to