simon831 wrote:
Ideally what I want is to either have OrderFieldIndex regenerate itself or store the 'new' entries in a partial class or use something like a region:
// __LLBLGENPRO_USER_CODE_REGION_START xxxx
// __LLBLGENPRO_USER_CODE_REGION_END
What I seem to be doing is manually maintaining a list and trying to stop the developers from using the normal FieldIndex enum....
Unless you can persuade Frans to replace all the enums with static classes and public consts
, I don't think you can directly extend the enum.
However, there is a helpful AmountOfFields property so you can always automatically start your numbering after that.
For a TypedList, I added a couple of extra constants in the partial class like this:-
public const int FollowUpMessagesFieldIndex = (int) ShipDFNTypedListFieldIndex.AmountOfFields;
public const int HasPriorityMessagesFieldIndex = FollowUpMessagesFieldIndex + 1;
They could also go in your custom factory so you can easier tell the difference between normal and extended fields.
Cheers
Simon