In my App designer for one of the panels I defined a tooltip. Now I want to get rid of it. Everytime i highlight and get rid of it in Code design view, I get a long series of read error messages but the tool string does not get removed. I can't go into code view and delete the line for tooltip string either as it is grayed out. So my question is how do I completely get rid of it without deleting the panel altogether and start over again?

6 commentaires

Alfred Giménez
Alfred Giménez le 23 Nov 2018
Hello Pappu, I have exactly the same issue. Did you find any solution for it?
Pappu Murthy
Pappu Murthy le 23 Nov 2018
No one answered my question and I have no idea how to do it still.
Cris LaPierre
Cris LaPierre le 23 Nov 2018
How/where did you add the tool tip? What component did you add it to? I haven't been able to duplicate the error.
Pappu Murthy
Pappu Murthy le 23 Nov 2018
Ok I tried to duplicate the error today. I createds a small test app. I have one panel and I created a tool strip string in it. It works normally. Now after saving my app closing it and open again. I try now to go to the panel component , Interactivity, and check the tool strip and try to remove all the contents in it. Here is the series of errors I noticed in my command window.
Warning: Error occurred while executing the listener callback for event GuiEvent defined for class
appdesigner.internal.componentview.DesignTimeComponentProxyView:
Error setting property 'Tooltip' of class 'Panel':
UIStrings data type does not support numeric values.
Error in matlab.ui.internal.DesignTimeGBTComponentController/handleDesignTimePropertyChanged (line 157)
obj.Model.(updatedProperty) = updatedValue;
Error in matlab.ui.internal.DesignTimePanelController/handleDesignTimePropertyChanged (line 54)
handleDesignTimePropertyChanged@matlab.ui.internal.DesignTimeGBTComponentController(obj, peerNode, data);
Error in matlab.ui.internal.DesignTimeGBTComponentController/handleDesignTimePropertiesChanged (line 123)
obj.handleDesignTimePropertyChanged(peerNode, propertySetData);
Error in matlab.ui.internal.DesignTimeGbtParentingController/handleDesignTimePropertiesChanged (line 73)
handleDesignTimePropertiesChanged@matlab.ui.internal.DesignTimeGBTComponentController(obj, peerNode, valuesStruct);
Error in appdesigner.internal.controller.DesignTimeController/handlePeerNodePropertiesSet (line 351)
obj.handleDesignTimePropertiesChanged(src, valuesStruct);
Error in appdesigner.internal.controller.DesignTimeController/handleGUIEvent (line 326)
obj.handlePeerNodePropertiesSet(src, filteredValuesStruct);
Error in appdesigner.internal.controller.DesignTimeController>@(src,event)handleGUIEvent(obj,src,event)
Error in appdesservices.internal.interfaces.view.AbstractProxyView/notify (line 117)
obj.notify@handle(varargin{:});
Error in appdesservices.internal.peermodel.PeerNodeProxyView/handlePropertiesSetFromClient (line 268)
notify(obj, 'GuiEvent', eventData);
Error in appdesservices.internal.peermodel.PeerNodeProxyView>@(varargin)obj.handlePropertiesSetFromClient(varargin{:}) (line 81)
obj.PropertiesSetListener = addlistener(obj.PeerNode, 'propertiesSet', @obj.handlePropertiesSetFromClient);
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));
What are you setting as the tip? I see this in your error messages:
Error setting property 'Tooltip' of class 'Panel':
UIStrings data type does not support numeric values.
I am just setting a 'string' as Tool tip and it shows correctly. But when I try to delete it by 'highlighting' it and 'backspace' it gives all those errors.
here is the complete code:
classdef MyTest2 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
TestingPanel matlab.ui.container.Panel
GOButton matlab.ui.control.Button
end
% App initialization and construction
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure
app.UIFigure = uifigure;
app.UIFigure.Position = [100 100 640 480];
app.UIFigure.Name = 'UI Figure';
% Create TestingPanel
app.TestingPanel = uipanel(app.UIFigure);
app.TestingPanel.Tooltip = {'adfdaf'; ''};
app.TestingPanel.Title = 'Testing..';
app.TestingPanel.FontWeight = 'bold';
app.TestingPanel.FontSize = 16;
app.TestingPanel.Position = [51 226 260 221];
% Create GOButton
app.GOButton = uibutton(app.TestingPanel, 'push');
app.GOButton.Position = [80 123 100 22];
app.GOButton.Text = 'GO';
end
end
methods (Access = public)
% Construct app
function app = MyTest2
% Create and configure components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
end

Connectez-vous pour commenter.

 Réponse acceptée

Cris LaPierre
Cris LaPierre le 23 Nov 2018
Modifié(e) : Cris LaPierre le 23 Nov 2018

0 votes

I see it now. This looks like a bug to me. I'll report it. If you do not want the tooltip to appear, the best workaround I can think of is to add the following to your startupFcn Callback.
app.Panel.Tooltip = '';
Of course, replace Panel with whatever you named it.

5 commentaires

Pappu Murthy
Pappu Murthy le 23 Nov 2018
Thanks. I will try that solution.
Jake Shea
Jake Shea le 31 Jan 2019
The problem with this workaround is that it is not backwards compatible. 2017b doesn't support the tooltip property, and since the instantiation code is not removed due to this bug, an affected App cannot be distributed for prior releases.
In addition, the impact on the supported release version is that a blank tooltip bubble still appears when the value is set to ''.
Robert
Robert le 7 Fév 2019
@Jake Shea: I don't get a blank tooltip after setting it to '' in R2018b. Your point on backwards incompatibility still stands though.
Walter Roberson
Walter Roberson le 7 Fév 2019
hasproperty() before doing the assignment .
Daniel Bailey
Daniel Bailey le 12 Avr 2019
Modifié(e) : Daniel Bailey le 12 Avr 2019
@Jake Shea & @Robert:
As far as backwards compatibility goes. I was able to remove blank tooltips from the code by opening it in a version that predates 'Tooltips' release.
To be exact with what I did:
Steps 1-3 completed in MATLAB 2019a
1) Deleted all Tooltip text
2) Save Copy As
3) Save as type: MATLAB 2017b APP (*.mlapp)
Steps 4-5 completed in MATLAB 2017b
4) Opened MATLAB 2017b
5) Right clicked to open *.mlapp file
At this point all of the tooltips had dissapeared from the code.
Interestingly enough, only saving the file as an earlier version did NOT fix the problem. Only at the point that the code was opened in app designer did the app.*.Tooltip = {''}; code dissapear.

Connectez-vous pour commenter.

Plus de réponses (1)

Johan
Johan le 15 Nov 2019

0 votes

Anybody know if this bug has been fixed in the newest version of Matlab?
2018B definitely still has this problem.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by