VO GUI Classes: subclassed TabControl caveats
Posted: Mon Mar 19, 2018 6:19 pm
In my migration of my VO GUI application I have lost a lot of time because of some TabControl issues.
This could be important for everyone porting VO GUI applications with subclassed TabControls to X#.
The source of all problems is the fact that sometimes in the VO 2.8 development the parameters of 3 strong typed methods were changed from int to dword:
__FocusPage()
__GetPageFromIndex()
__GetSymbolFromIndex()
Earlier versions of the VO GUI SDK classes have these parameters typed as int, and the same is true for the Vulcan version.
My subclass of the TabControl, the DynamicTabControl, had overwritten these methods, and that has caused several problems and errors:
Wolfgang
P.S. fixing all the warnings the X# compiler gave, I found and fixed several errors in my framework library, some of them there for at least 10 or 15 years.
This could be important for everyone porting VO GUI applications with subclassed TabControls to X#.
The source of all problems is the fact that sometimes in the VO 2.8 development the parameters of 3 strong typed methods were changed from int to dword:
__FocusPage()
__GetPageFromIndex()
__GetSymbolFromIndex()
Earlier versions of the VO GUI SDK classes have these parameters typed as int, and the same is true for the Vulcan version.
My subclass of the TabControl, the DynamicTabControl, had overwritten these methods, and that has caused several problems and errors:
- since the methods of the TabControl class and these of the DynamicTabControl class differed in their parameter list, the .NET runtime accepted them as different ones, and therefore the Send() function was not working anymore and gave a runtime error
- fixed this issue, the __FocusPage() method called the wrong method because a dword was passed instead of an int, leaving the tabcontrol pages blank
Wolfgang
P.S. fixing all the warnings the X# compiler gave, I found and fixed several errors in my framework library, some of them there for at least 10 or 15 years.