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




_______________________________________________
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