This document describes the PX1005 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1005 | There is probably a typo in the name of the view delegate or the action delegate. | Warning (ISV Level 3: Informational) | Available |
In a graph, a data view delegate must have the same name as the corresponding data view but with the first letter in a different case (uppercase or lowercase). The same rule applies to action delegates of a graph and their corresponding graph actions.
The code fix changes the name of the delegate in the graph as follows:
- The name of the data view delegate so that it matches the data view name defined in the graph.
- The name of the action delegate so that it matches the action name defined in the graph.
The diagnostic supports both graphs and graph extensions.
public class LEPMaint : PXGraph<LEPMaint>
{
public PXSelect<ListEntryPoint> Items;
public IEnumerable itemss() // The PX1005 warning is displayed for this line.
{
yield break;
}
public PXAction<ListEntryPoint> ViewItem;
[PXButton]
[PXUIField]
public IEnumerable viewItm(PXAdapter adapter) // The PX1005 warning is displayed for this line.
{
yield break;
}
}
public class LEPMaint : PXGraph<LEPMaint>
{
public PXSelect<ListEntryPoint> Items;
public IEnumerable items()
{
yield break;
}
public PXAction<ListEntryPoint> ViewItem;
[PXButton]
[PXUIField]
public IEnumerable viewItem(PXAdapter adapter)
{
yield break;
}
}