BartPermentier / al-toolbox

Adds Features to the AL Language Extension
MIT License
13 stars 9 forks source link

Generate SetLoadFields: add methods as field / add flowfield or flowfilter as field / after if problem #45

Closed ti-jalopez closed 3 years ago

ti-jalopez commented 3 years ago

Hi, After testing the command "ALTB: Generate SetLoadFields", I'll give you some improvements, to see if they can be incorporated into the extension.

Sometimes the command ALTB: Generate SetLoadFields add no normal fields to SetLoadFields.

//Origin
if (condicion) then 
  var.Find(); 

//After run ALTB: Generate SetLoadFields
if (condicion) then 
    var.SetLoadFields(field1, field2); 
var.Find(); 

//Fixed manually
if (condicion) then begin 
    var.SetLoadFields(field1, field2); 
    var.Find(); 
end; 

Best regards,

dsaveyn commented 3 years ago

Hi,

We've taken a look at your issues. Please find our feedback below:

Method: varrec.IsEmpty (method without parentheses at the end) will be added to field list of SetLoadFields. Please please exclude methods in field list of SetLoadFields

This has been fixed in another issue and will be available in the next release. However, AL Toolbox has no knowledge of actual field or method definitions so we've excluded a fixed set of system functions at this point.

FlowField is added to field list of SetLoadFields. Please check just normal fields.

Unfortunately this is something we are unable to fix at this point. As already mentioned, AL Toolbox has no knowledge of the field definitions at this point. When we add this logic, we'll take this remark into account.

If the SetLoadField is added after if (condition) and before next command, the SetLoadFields is included without begin..end.

This has been fixed and will be available in the next release.