# tripleangle Migration Report

## Completed by Migration Tool

- Generated tripleangle_App.mlapp from tripleangle.fig and tripleangle.m
- Converted components and configured their properties
- Copied GUIDE callback and utility function code
- Analyzed tripleangle.m for unsupported MATLAB API usage

## Your Next Steps

1. Decide whether to continue migrating the tripleangle 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 tripleangle App

The tripleangle 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
--- | --- | ---
PickableParts | This property is not supported in App Designer. | axes1

## 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 App Designer Versus GUIDE.

#### 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 tripleangle and Workarounds

Functionality | Details and Workarounds | GUIDE Tag
--- | --- | ---
radiobutton | Invalid parent for radio button. Set the parent to a button group. ##### Workaround: Recreate the radio button in a button group in App Designer. Alternatively, consider replacing the radio button with a state button or a check box. | gimbals
Callback | Callbacks for radio and toggle buttons must be added to the parent button group. ##### Workaround: Use the `SelectionChangedFcn` callback of the parent button group. | gimbals

### 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

App Designer Versus GUIDE

Designing Apps in App Designer

Graphics Support in App Designer

Programming Apps in App Designer