On an app I am working I put a BalanceObject between a list and a group object. It works pretty good, but unfortunately, on window snapshot the position of BalanceObject is not saved.
Based on MUI Balance documentation (https://muidev.de/wiki/Documentation/API/MUI_Balance), the only thing I need to do is to set an Object ID for this to be saved:
Since MUI5 2018R1 (muimaster.library 21.121) Balance class implements the additional features of BetterBalance.mcc. This means that the user can store and restore the balanced weights of the neighboring objects by snapshotting a window if the application sets a unique MUIA_ObjectID for the Balance object.
I define it like below:
Child, BalanceObject, MUIA_ObjectID, 1, End,
I compile the app with latest MUI SDK. Do you believe there are more things I should do?
I really must appologize for this wrong documentation. I updated it in the meantime. Unfortunately just snapshotting the window is not enough, a little bit more has to be done:
Please refer to the updated documentation of Balance class. The Balancing demo has been updated as well in the nightly build archives.
@tboeckel
Thank you so much for taking the time to investigate it and make those changes to the documentation and the balance demo. I will surely check it soon and use that solution you provide.
May I ask you if this is going to work for users that use MUI 3.8 on AmigaOS 3 as well? To have that working, should I compile with latest SDK?
Balance class of MUI 3.8 does not implement that feature. That is why BetterBalance was developed. However, the approach to save/restore the weights is exactly the same.