Posted on 14/03/2018 14:18:42
That was a good little mystery. :)
Solution: If you multiple all your ordering-numbers by 10, things should work.
Explaination:
The ordering uses a semi-cryptic logic, where it does the following:
1. Count the number of properties in the class (config.addin properties)
2. Read the ordering number
3. Use 1+2 as the ordering
This means, that if you do not specify an ordering, the order you write the properties IN THE FILE determines which order the fields are rendered in. So base-class has 1,2,3,4 as "implicit" ordering numbers for each property. Lets look at the inherited class.
Class BaseA {
Property 1
Property 2
}
Class B extends BaseA{
Property A
Property B
Property 1 <--- Inherited from BaseA
Property 2 <--- Inherited from BaseA
}
So when you set property 1 to have ordering 1, property 2 to 2 and propery A to 3, you get the following
Property a = 3 (ordering number) + 1 (position in file) = 4
property 1 = 1 (ordering number) +3 (position in file) = 4
Multiplying by 10 is an easy fix, as you have less than 10 properties in total.
Property a = 30 (ordering number) + 1 (position in file) = 31
property 1 = 10 (ordering number) +3 (position in file) = 13
Hope this helps and that the explaination makes sense.
BR
Martin