On Wed, Jul 2, 2008 at 11:29 AM, Paul McNett <[EMAIL PROTECTED]> wrote:
> Nate Lowrie wrote:
>> I like the new handlers.  However, I am still forced to override the
>> _onOk method if I need to cancel the dialog for any reason, such as a
>> validation failure.  Would you be opposed to changing the behavior to
>> return False if the dialog needs to stay visible (i.e. Validation
>> Failure) or True if there is no problem and it can return?  I took a
>> look at the code and shouldn't harm the depreceated onOk.
>
> I'm having a similar problem: how to override the dialog closing on
> either cancel or okay. I have my own code to save the dialog instance
> and show it again instead of reinstantiating. Before the recent changes,
> I just called evt.stop() to keep the default behavior from happening,
> followed by dlg.hide() to hide it.
>
> Now since appdev code doesn't have access to the wx event object, there
> isn't an obvious solution to this other than overriding the private
> methods _onOK() and _onCancel().

The key is not calling the EndModal method.  You don't even need an evt.stop().


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

Reply via email to