OK so the title can be interpreted in many different ways but what is says in essential the truth.
I had a complaint from a client who was testing a plugin that I had created. She said that “deleting makes Raiser’s Edge go backwards and that the arrow keys were broken too”. Of course it took some probing for me to work out what she really meant but here is it is.
The application consisted of a Windows form which was displayed after pressing the link on the RE plugin’s screen. On that form there were a few text boxes to enter data. Whenever she made a mistake she would delete the text using the backspace button and Raiser’s Edge would change pages from the plugin’s screen back to the home page or wherever she happened to be before she went to the plugin’s screen. Well it now made some more sense and less of the ramblings of a crazy woman!
Of course I had never seen anything like this before. It never did it in Visual Studio. What was going on?
Well it seems as though the .NET events were being consumed by the .NET Windows Form, i.e. the backspace button was deleting the text. However the COM event was not being consumed and it was being transferred to RE (I am guessing this is what happens but if anyone else would like to enlighten me I would be happy to hear about it).
To get around this problem I made the Window’s Form modal. Previously it was not modal so that you could open it up from the plugin and then go and work in another area of RE. By making it modal the event was not passed back to RE (and the arrow keys magically worked again can’t really work that one out)