Forms Transformation - Tips and Trics (3)

While transforming the forms for our add-on, we decided that some functionality will become absolete for pages. In this case it was an "Edit-buton" that we use on a lot of card forms. Luc van Vugt also wrote a blog about the problems we ran into.

But well, how do we remove the obsolete code in an efficient way? Again I had to make some changes to  the "CodeRules.txt" file in the transformation tool. To keep a remark for future reference, I also wanted a comment line that replaces the code, so we can see why the code was removed in the pages.

<find>
IF GeneralSettingsMgt.ShowEditButton() THEN
  CurrForm.EDITABLE := FALSE;
<replace>
//Code removed by transformation

Following the '<find>' tag, you put the code you want to be removed from the pages. After the '<replace>' tag, you can put your replacement code or if needed, your comment that the code was removed. One reminder, this only works when the code is exactly as you put it in the 'CodeRules.txt' file.

Comment List
Related
Recommended