Selecting an empty drop down uicontrol in AppDesigner
2 views (last 30 days)
Show older comments
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242597/empty%20uidropdown.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));
0 Comments
Answers (1)
Rajani Mishra
on 18 Oct 2019
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.
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!