Range Slider bug when moving sliders

Hi all,
I'm trying to use the Range Slider in app designer:
fig = uifigure;
sld = uislider(fig,"range");
But even the above minimalistic example results in the following error as soon as I drag one of the sliders:
Error in executing callback registered with ViewModel:
No public property 'PrivateValue' for class 'RangeSlider'.
I'm using a MacBookPro M2 and 23.2.0.2320655 (R2023b) Prerelease Update 3 and wondering if the problem is Apple silicon specific or if this is a general problem. Either way, I would much appreciate any inputs on how to solve this.

 採用された回答

Jan Zbinden
Jan Zbinden 2023 年 10 月 19 日

0 投票

Found the answer to my problem when digging in the code of the app designer components. The property access of the LimitedRangeValueComponent class (found in the folder toolbox/matlab/uicomponents/uicomponents/+matlab/+ui/+control/+internal/+model/+mixin) might be buggy.
The current code of LimitedRangeValueComponent is:
properties(Access = {?matlab.ui.control.internal.model.LimitedValueComponent, ...
?appdesservices.internal.interfaces.controller.AbstractController})
% Internal properties
%
% These exist to provide:
% - fine grained control to each properties
% - circumvent the setter, because sometimes multiple properties
% need to be set at once, and the object will be in an
% inconsistent state between properties being set
PrivateValue = [0 100];
end
Changing it to the following fixes the problem
properties(Access = public)
% Internal properties
%
% These exist to provide:
% - fine grained control to each properties
% - circumvent the setter, because sometimes multiple properties
% need to be set at once, and the object will be in an
% inconsistent state between properties being set
PrivateValue = [0 100];
end
Not an elegant solution, but it works.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInteractive Control and Callbacks についてさらに検索

製品

リリース

R2023b

タグ

質問済み:

2023 年 10 月 19 日

回答済み:

2023 年 10 月 19 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by