...
Code Block |
---|
int Grid(int context,int ctlRoot,int iStart) { // migration event handler: called by translation process when it encounters an MSGrid.Grid class member reference string propName; string Value; string Name; if(context == EventType.ControlValue) { propName = Store.GetIdent(iStart); Value = Write.Clear(); Name = Store.GetName(ctlRoot); if(propName == "FixedRows") Grid_FixedRows(Name,Value); else return 0; return 1; } if(context != EventType.InitializeComponent) return 0; return 1; } void Grid_FixedRows(string Name, string Value) { // migration event helper: called from handler when Authoring the FixedRows property in the designer MigClass if (Value > 0) { System.LogMessage("Grid_FixedRows:" + Name + "," + Value); if(Select.Dialect == Dialects.vbn) { Write.Line("Me." + Name + ".RowHeadersVisible ColumnHeadersVisible= True"); } else { Write.Line("this." + Name + ".RowHeadersVisible ColumnHeadersVisible= true;"); } } } |
To engage the migration handler, I need to attach gmSL code block to the RefactorLibrary. I must do this in IDF my modifying the RefactorLibrary file .as follows:
1) Add an event attribute to the top level Refactor element
...