Selecting an empty drop down uicontrol in AppDesigner

조회 수: 2 (최근 30일)
Chris Oreinos
Chris Oreinos 2019년 10월 14일
댓글: Chris Oreinos 2019년 10월 21일
When clicking on the empty, small size area that appears when expanding an empty uidropdown control, how can the following warning be avoided (obviously not merely by turning that warning off):
empty uidropdown.PNG
% Warning: Error occurred while executing the listener callback for event GuiEvent defined for class
% appdesservices.internal.peermodel.ServerDrivenPeerNodeProxyView:
% Unable to perform assignment with 0 elements on the right-hand side.
%
% Error in matlab.ui.control.internal.model.ExactlyOneSelectionStrategy/getSelectedTextGivenIndex (line 268)
% value = obj.Component.PrivateItems{index};
%
% Error in matlab.ui.control.internal.model.SelectedTextValueStrategy/getValueGivenIndex (line 53)
% value = obj.Component.SelectionStrategy.getSelectedTextGivenIndex(index);
%
% Error in matlab.ui.control.internal.model.AbstractStateComponent/getValueGivenIndex (line 401)
% value = obj.ValueStrategy.getValueGivenIndex(index);
%
% Error in matlab.ui.control.internal.controller.DropDownController/handleEvent (line 44)
% previousValue = obj.Model.getValueGivenIndex(previousSelectedIndex);
%
% Error in appdesservices.internal.interfaces.controller.AbstractController/handleProxyViewEvent (line 279)
% handleEvent(obj, src, event);
%
% Error in appdesservices.internal.interfaces.controller.AbstractController>@(src,event)handleProxyViewEvent(obj,src,event)
%
% Error in appdesservices.internal.interfaces.view.AbstractProxyView/notify (line 117)
% obj.notify@handle(varargin{:});
%
% Error in appdesservices.internal.peermodel.PeerNodeProxyView/handlePeerEventFromClient (line 214)
% notify(obj, 'GuiEvent', eventData);
%
% Error in appdesservices.internal.peermodel.PeerNodeProxyView>@(varargin)obj.handlePeerEventFromClient(varargin{:}) (line 78)
% obj.PeerEventListener = addlistener(obj.PeerNode, 'peerEvent', @obj.handlePeerEventFromClient);
%
% Error in hgfeval (line 62)
% feval(fcn{1},varargin{:},fcn{2:end});
%
% Error in javaaddlistener>cbBridge (line 52)
% hgfeval(response, java(o), e.JavaEvent)
%
% Error in javaaddlistener>@(o,e)cbBridge(o,e,response) (line 47)
% @(o,e) cbBridge(o,e,response));

답변 (1개)

Rajani Mishra
Rajani Mishra 2019년 10월 18일
Hi,
Without having a look at the code, I think the error you are facing is because the listener callback which you have implemented is not able to receive any value because of the empty drop down uicontrol having no value to be assigned.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by