Saving BalanceObject on window snapshot

4 posts / 0 new
Last post
walkero
walkero's picture
Offline
Last seen: 3 months 2 days ago
Joined: 2009-05-03 16:54
Saving BalanceObject on window snapshot

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:

  1. Child, BalanceObject, MUIA_ObjectID, 1, End,

I compile the app with latest MUI SDK. Do you believe there are more things I should do?

tboeckel
tboeckel's picture
Offline
Last seen: 3 years 9 months ago
Joined: 2011-09-13 12:32
Re: Saving BalanceObject on window snapshot

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:

This means that the user can save and restore the balanced weights of the neighboring objects for each Balance object with a unique MUIA_ObjectID during MUIM_Application_Save and MUIM_Application_Load.

Please refer to the updated documentation of Balance class. The Balancing demo has been updated as well in the nightly build archives.

walkero
walkero's picture
Offline
Last seen: 3 months 2 days ago
Joined: 2009-05-03 16:54
Re: Saving BalanceObject on window snapshot

@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?

tboeckel
tboeckel's picture
Offline
Last seen: 3 years 9 months ago
Joined: 2011-09-13 12:32
Re: Saving BalanceObject on window snapshot

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.

Log in or register to post comments