Adding items to menus was fairly illogical and was updated in DFL 0.9.5.
If too much of your code depends on the old behavior of menus, you can call
Menu.setDFL092() before creating menus and the old usage (Old Behavior) will be reverted. This function requires compiling with the
-d compiler switch.
The below table illustrates the changes.
|Description||Old Behavior||New Behavior|
MenuItem.index init value
MenuItem.index = n; n before adding to another menu
MenuItem.index after adding (
|previous MenuItem.index||end of |
MenuItem.index after inserting (
MenuItem.index after removing from parent menu
|Appending to |
|Insert at end of |