Skip to content

Instantly share code, notes, and snippets.

@noakesey

noakesey/xpp

Created Dec 14, 2018
Embed
What would you like to do?
Handling table events
[DataEventHandler(tableStr(FMVehicle), DataEventType::ValidatedWrite)]
public static void FMVehicle_onValidatedWrite(Common sender, DataEventArgs e)
{
ValidatedEventArgs validateArgs = e as ValidatedEventArgs;
FMVehicle vehicle = sender as FMVehicle;
boolean result = validateArgs.parmValidateResult();
if (vehicle.NumberOfCylinders == 0)
{
result = checkFailed('Invalid number of cylinders.');
validateArgs.parmValidateResult(result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.