canExecute and feedback by MessageBox [message #178674] |
Thu, 21 April 2005 08:44 |
Eclipse User |
|
|
|
Originally posted by: tkoray.aselsan.com.tr
Hi,
I want to show an MessageBox to inform the user that a deletion of an
object cannot be done for some reason. So I override the canExecute
method of my deletecommand and add some code to open a messagebox. But
this time it shows the messagebox everytime I select the object.
So I moved the code to execute method so when I press "DEL", it displays
the messagebox but not really delete the object. But now this makes my
editor dirty.
Long story short, what is a good way to show a message box in such a
situation? Or is it better to show feedback differently?
Thanks,
Tankut Koray
|
|
|
Re: canExecute and feedback by MessageBox [message #178974 is a reply to message #178674] |
Mon, 25 April 2005 03:54 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Why is the delete action enabled if the user cannot delete the item? I
would say the action should display the message, but the action's run()
method shouldn't even be reachable if the item is not deletable.
"Tankut Koray" <tkoray@aselsan.com.tr> wrote in message
news:d47pbb$in9$1@news.eclipse.org...
> Hi,
>
> I want to show an MessageBox to inform the user that a deletion of an
> object cannot be done for some reason. So I override the canExecute method
> of my deletecommand and add some code to open a messagebox. But this time
> it shows the messagebox everytime I select the object.
>
> So I moved the code to execute method so when I press "DEL", it displays
> the messagebox but not really delete the object. But now this makes my
> editor dirty.
>
> Long story short, what is a good way to show a message box in such a
> situation? Or is it better to show feedback differently?
>
> Thanks,
> Tankut Koray
|
|
|
Re: canExecute and feedback by MessageBox [message #179514 is a reply to message #178974] |
Thu, 28 April 2005 05:05 |
Eclipse User |
|
|
|
Originally posted by: tkoray.aselsan.com.tr
Ok than which method of delete command to place "display the message"
part? if I pu it in canExecute method, when I select the figure message
the message is displayed immidiately without pressing the "DEL" key.
Randy Hudson wrote:
> Why is the delete action enabled if the user cannot delete the item? I
> would say the action should display the message, but the action's run()
> method shouldn't even be reachable if the item is not deletable.
>
> "Tankut Koray" <tkoray@aselsan.com.tr> wrote in message
> news:d47pbb$in9$1@news.eclipse.org...
>
>>Hi,
>>
>>I want to show an MessageBox to inform the user that a deletion of an
>>object cannot be done for some reason. So I override the canExecute method
>>of my deletecommand and add some code to open a messagebox. But this time
>>it shows the messagebox everytime I select the object.
>>
>>So I moved the code to execute method so when I press "DEL", it displays
>>the messagebox but not really delete the object. But now this makes my
>>editor dirty.
>>
>>Long story short, what is a good way to show a message box in such a
>>situation? Or is it better to show feedback differently?
>>
>>Thanks,
>>Tankut Koray
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03266 seconds