The berengui app has functionality that is not supported in App Designer. If that functionality is an important aspect of your app, then it might not be practical to continue migrating it. Review this list, and confirm that none of the items are critical to the functioning of your app before continuing to the next step.
Functionality | Details | GUIDE Tag / Line # |
---|---|---|
ButtonDownFcn | This callback is not supported in App Designer. | plotAIgram |
PickableParts | This property is not supported in App Designer. | plotAIgram
plotCC
plotEventGram
plotMod1
plotMod2
plotPI
|
gca | This is not supported in App Designer code. | |
gcf | This is not supported in App Designer code. | |
ginput | This is not supported in App Designer code. |
App Designer uses object-oriented code and new component APIs. Use the following process to update the code to be compatible with App Designer. For more details, see GUIDE Migration Strategies.
Choose a callback to update, starting with the OpeningFcn
callback.
Resolve any code alerts () that appear in the editor.
Apply workarounds for partially supported functionality.
Resolve any run time errors. For assistance, see Common Error Messages and Suggested Actions.
Run the app and exercise the callback you are updating.
Functionality | Details and Workarounds | GUIDE Tag |
---|---|---|
SizeChangedFcn | App Designer only supports pixel units. You might need to update the SizeChangedFcn callback if it uses other units.Workaround:Update your SizeChangedFcn callback to work with pixel units. | main |
Error Message | Example Line of Erroring Code | Suggested Action | Explanation |
---|---|---|---|
Unrecognized property '<property name>' for class '<app name>'. |
app.numCylinders = 6; |
Create an app property and access it using app.<property name> throughout your app's code. |
Properties must be added before you can use them. |
Undefined function or variable 'hObject'. |
app.output = hObject; |
Delete this code. | This code is not needed because App Designer uses the app object as the output. |
guidata(hObject, handles); |
Delete this call to guidata . |
The guidata function is not needed in App Designer. |
|
miles = get(hObject, 'Value'); |
Replace hObject with app.<component> , where <component> is the object that triggers the callback.velocity = app.VelocityEditField.Value; |
hObject is used in GUIDE to access the object that triggered the callback. App Designer uses app.<component> instead. |
|
Undefined function or variable 'handles'. |
calculateMPG(handles); |
Replace handles with app .calculateMPG(app); |
GUIDE uses handles to share components and data. App Designer uses the app object instead. |
Error using matlab.ui.control.<component type> |
set(app.Button, 'String', 'Go'); |
Update the code to use the appropriate property for this component.app.Button.Text = 'Go'; |
To see a list of component properties, right-click a component on the canvas and select Help on Selection in the context menu. |
Comparing GUIDE and App Designer
Designing Apps in App Designer