Forum  Commercial Foru...  Commercial Foru...  Dispose Code Error
Previous Previous
 
Next Next
New Post 5/25/2009 2:14 PM
Resolved
  derekmhart@yahoo.com
685 posts
1st Level Poster


Dispose Code Error 

I added a VWG library, and then add an inherited form. It makes this code.

    Public Overrides Sub Dispose()
        MyBase.Dispose()
        If Not (components Is Nothing) Then
            components.Dispose()
        End If
    End Sub

On the line Public Overrides Sub Dispose(), Dispose() is underlined with an error of "Public Overrides Sub Dispose() cannot override 'Public Sub Dispose()' because it is not declared 'Overridable'" - why does this auto code do this, and what should I do to remedy it?

 
New Post 5/25/2009 3:26 PM
  palli
11189 posts
1st Level Poster




Re: Dispose Code Error 

Hi Derek,

There is an open issue on that subject which you can find here.

I added notes about the compiler error to the issue.

Please view the issue and see workaround suggestions.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 5/25/2009 3:50 PM
  derekmhart@yahoo.com
685 posts
1st Level Poster


Re: Dispose Code Error 

Can I correct this myself by creating a new template for Visual Studio?

1) If I create a new template for Visual Studio, will I be able to use it in Visual Web Developer Express (with VWG Express also)?

2) How do I alter these templates? Is this a fix I could do, to properly add the designer file and the correct code so it does compile?

3) Can I add references in this template that always appear?

 
New Post 5/26/2009 5:41 AM
Accepted Answer 
  ori.cohen
4383 posts
1st Level Poster




Re: Dispose Code Error 
Modified By ori.cohen  on 5/26/2009 7:42:28 AM)

Hello Derek,

There is nothing wrong with our Form template. As you can see in Palli's workaround suggestion in the issue, he is actually saying you should use the Form template and then add the inheritence code manually.

Templates cannot be added in MS Visual Web Developer and in MS Visual Studio Express 2008.

You do not need to alter any template. The reason for this error is faulty code in our MS Visual Studio integration.

Regards,

Ori Cohen
Support Manager, the Visual WebGui team

 
New Post 6/3/2009 9:05 PM
  derekmhart@yahoo.com
685 posts
1st Level Poster


Re: Dispose Code Error 

Just to clarify, if I add an inherited control, this code is added:

    'Form overrides dispose to clean up the component list.
    Public Overrides Sub Dispose()
        MyBase.Dispose()
        If Not (components Is Nothing) Then
            components.Dispose()
        End If
    End Sub
 

What should I change it to so it compiles?

 
Previous Previous
 
Next Next
  Forum  Commercial Foru...  Commercial Foru...  Dispose Code Error
Azure banner
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS