Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » canExecute and feedback by MessageBox
canExecute and feedback by MessageBox [message #178674] Thu, 21 April 2005 08:44 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
>
Previous Topic:How to use ShortestPathConnectionRouter
Next Topic:refresh all editpart
Goto Forum:
  


Current Time: Sun Feb 05 15:38:29 GMT 2023

Powered by FUDForum. Page generated in 3.01481 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top