The version of gmStudio published 08/21/2023 version of gmStudio changes how control events are hooked to handlers in designer code.
By default, event hookups now use a generic Prior to the 5/30/2023 release, all events hookup used the specialized delegate form:
Code Block |
---|
this.tvTreeView.NodeMouseClick += new System.Windows.Forms.EventHandler<TreeNodeMouseClickEventArgs>TreeNodeMouseClickEventHandler(this.tvTreeView_NodeClick); |
In the last release (5/30/2023), all events hookup here modified to use the simplified form:
Code Block |
---|
this.tvTreeView.NodeMouseClick += this.tvTreeView_NodeClick; |
Prior to the 5/30/2023 release, all events hookup used the specialized delegate form:
Code Block |
---|
this.tvTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvTreeView_NodeClick); |
The simplified form was introduced as part of the even event handler enhancements implemented with the 5/30 release. It was selected because it supports both specialized delegates and generic delegates. However, when one modifies and saves a form in the Visual Studio designer, all of the simplified event handler hookups were removed from the rewritten form! This makes the form non-functional. In order for the hookups to be retained by the VS Designer rewriting process, a generic or specialized delegate must be used.
If you are migrating to a stub control generated by the tool (e.g. the default) then the event will have a generic delegate and no action is needed. However, if you are migrating to a .NET control (e.g. a WinForms control) then it is likely that the event will require the more traditional specialized delegate form. This must be specified in the migration rules using a specializedHookup=on attribute in the migration rules for the event, for example:
...