Cancel button in a dialog

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cancel button in a dialog

Brennan Williams
I have an import dialog with two buttons defined as Actions at the bottom...

    ImportAllVectorsButton = Action( name = 'Import',
                         action='_importallvectors_clicked',
                         tooltip = 'Import specified vectors in this deck')
    CancelImportAllVectorsButton = Action( name = 'Cancel',
                         action='_cancelimportallvectors_clicked',
                         tooltip = 'Cancel the import of vectors in this
deck')

If I click the 'Cancel' button part way through importing data then
_cancelimportallvectors_clicked is called in my Handler class but on
completion it then goes back to continuing the import.

What am I doing wrong here?

Brennan


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cancel button in a dialog

Robert Kern
On Wed, Apr 7, 2010 at 5:06 PM, Brennan Williams
<[hidden email]> wrote:

> I have an import dialog with two buttons defined as Actions at the bottom...
>
>    ImportAllVectorsButton = Action( name = 'Import',
>                         action='_importallvectors_clicked',
>                         tooltip = 'Import specified vectors in this deck')
>    CancelImportAllVectorsButton = Action( name = 'Cancel',
>                         action='_cancelimportallvectors_clicked',
>                         tooltip = 'Cancel the import of vectors in this
> deck')
>
> If I click the 'Cancel' button part way through importing data then
> _cancelimportallvectors_clicked is called in my Handler class but on
> completion it then goes back to continuing the import.
>
> What am I doing wrong here?

Can't tell. Can you show us a complete, minimal example demonstrating
the behavior?

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cancel button in a dialog

Brennan Williams
Robert Kern wrote:

> On Wed, Apr 7, 2010 at 5:06 PM, Brennan Williams
> <[hidden email]> wrote:
>  
>> I have an import dialog with two buttons defined as Actions at the bottom...
>>
>>    ImportAllVectorsButton = Action( name = 'Import',
>>                         action='_importallvectors_clicked',
>>                         tooltip = 'Import specified vectors in this deck')
>>    CancelImportAllVectorsButton = Action( name = 'Cancel',
>>                         action='_cancelimportallvectors_clicked',
>>                         tooltip = 'Cancel the import of vectors in this
>> deck')
>>
>> If I click the 'Cancel' button part way through importing data then
>> _cancelimportallvectors_clicked is called in my Handler class but on
>> completion it then goes back to continuing the import.
>>
>> What am I doing wrong here?
>>    
>
> Can't tell. Can you show us a complete, minimal example demonstrating
> the behavior?
>  
Hmmmm, put a little test app together and it works ok so I need to dig
around a bit more in my main app.



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev