berengui Migration Report

Completed by Migration Tool

Your Next Steps

  1. Decide whether to continue migrating the berengui app depending on whether it has important features that are not supported in App Designer.
  2. Update the app code to use new APIs.

Step 1: Decide Whether to Continue Migrating the berengui App

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 #
ButtonDownFcnThis callback is not supported in App Designer.
plotAIgram
PickablePartsThis property is not supported in App Designer.
plotAIgram
plotCC
plotEventGram
gcaThis is not supported in App Designer code.
gcfThis is not supported in App Designer code.
ginputThis is not supported in App Designer code.

Step 2: Update the App Code to Use New APIs

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.

1. Choose Callback

Choose a callback to update, starting with the OpeningFcn callback.

2. Resolve Code Alerts

Resolve any code alerts () that appear in the editor.

3. Apply Workarounds

Apply workarounds for partially supported functionality.

5. Resolve Errors

Resolve any run time errors. For assistance, see Common Error Messages and Suggested Actions.

4. Run App

Run the app and exercise the callback you are updating.

Partially Supported Functionality in berengui and Workarounds

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

Common Error Messages and Suggested Actions

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>

There is no <property name> property on the <component type> class.
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.

Additional Resources

Comparing GUIDE and App Designer

GUIDE Migration Strategies

Designing Apps in App Designer

Displaying Graphics in App Designer

Programming Apps in App Designer