InvalidCastException error when displaying a popupmenu


03-19-2007, 5:23 AM
Hello, I am getting the following error when I attempt to display a popupmenu:

System.InvalidCastException
Message: Unable to cast object of type 'DataDynamics.SharpUI.Toolbars.PopupMenu' to type 'DataDynamics.SharpUI.Toolbars.DockableBand'.

The line of code that is generating this error is:

Call ppmExport.Show()

'ppmExport' is a 'DataDynamics.SharpUI.Toolbars.PopupMenu' type. The line of code is executed on the 'Executed' event of a command button called 'cmdExport' located on a toolbar.

I have attached the full error document produced by our aplication and the saved toolbar layout in the hope that you will be able to provide a quick solution. I have placed both into a zip file.

Please note that the application generating this error is extremely large and I am unable to send you the source code. I also do not have the time to create a new application in an attempt to replicate this issue so that you CAN have the source code. I could spend days trying to create an app that generates the same issue without any guarantees that it will.

I must say that I am getting more and more errors with your SharpUI controls. I have another outstanding issue that you have not resolved yet that is delaying the release of our product. Please see the 'dragdrop' error posted previously.

Re: InvalidCastException error when displaying a popupmenu


03-19-2007, 2:04 PM
iKevan,

Thank you for the post.  Unfortunately I am having some trouble reproducing the problem you are describing.  I have attached the small running sample I used to test this with.  Also included with in the zip file is a short video clip demonstrating how I tested this.

Could you please provide some additional information that I can use to reproduce this error?  Please understand that unless we can see the error, we will not be able to determine if any updates we make actually resolve the issue you are experiencing.

Thank you for any additional insight you can offer and I look forward to hearing from you.

Re: InvalidCastException error when displaying a popupmenu


03-20-2007, 6:13 AM
As mentioned in my earlier post, I am unable to create a new app that is guaranteed to replicate this issue. I have however attached a new image that shows the error occurring. As you can see, there appear to be a bunch of 'ShadowForms' displayed.

The error does not occur every time I run my app, it appears to be quite random and if I ignore it, the app continues to run.

For a link to download a beta copy of the full application in which this and the other errors occur, please contact me for the address.

Re: InvalidCastException error when displaying a popupmenu


03-20-2007, 7:27 AM
After further investigation, the error seems to occur when I click down on one of the menu items and then drag the mouse away from the menu while still holding the mouse button down. If I constantly do this on various parts of the menu and sub menu in quick succession, the error is triggered.

Re: InvalidCastException error when displaying a popupmenu


03-20-2007, 10:26 AM
IKevan,

Thank you for the reply.  I was able to use the additional information you provided to reproduce the problem you described with the sample I posted earlier.  I have addressed this to our development team as CR#24090.  I have included your e-mail address with the report so that you can be notified when this is addressed.

Thank you for the feedback and please let me know if there is anything else I can assist you with.

Re: InvalidCastException error when displaying a popupmenu


03-27-2008, 7:16 AM
Hello there. I notice there is a new service pack available (SP5) in beta but this issue isn't listed as one of the items resolved. Can you please let me know if this issue is going to be resolved in SP5 and when that service pack is going to be out of beta. We are gettint this error more and more now.

Re: InvalidCastException error when displaying a popupmenu


03-27-2008, 3:19 PM
Thank you for your question. In our system the issue appears to have been addressed. Please try the latest build available attached to this post to see if it resolves your issue. Also, unfortunately, SharpUI is at its end of sale. You can find some additional information about this announcement here:

http://www.datadynamics.com/forums/109605/ShowPost.aspx

Thanks,
    Eric

Re: InvalidCastException error when displaying a popupmenu


03-31-2008, 4:19 AM
Hello there,

You mention that the latest build is attached to the post but I do not see it. Can you send me an address to view the latest release.

IAN

Re: InvalidCastException error when displaying a popupmenu


03-31-2008, 3:53 PM
Sorry i didnt realize it did not post because of the size. You can find it available for download here:

http://downloads.datadynamics.com/sui1501287.zip

Thanks,
        Eric