AppDesigner issues: reordering and undeleting callbacks, turning off Code Analyzer markup

조회 수: 15 (최근 30일)
In the AppDesigner code view editor, the callbacks appear in a certain order. I was wondering if there was a way to shuffle them into a different order, other than the obviously inconvenient way of deleting and rewriting them from scratch. Cut & paste doesn't appear to be an option.
Also, I seem to find (this is in R2017a) that when I delete a callback using the context menu in the callbacks tab, there is no going back. In other words, the Undo toolbar button doesn't become active to let me restore it. Is it supposed to be that way?
Finally, is there really no way of suppressing Code Analyzer markup? If I upgrade to R2017b would I have this capability? There is an "Enable app coding alerts" checkbox, but all that does is get rid of warning icons along the right hand edge of the editor. The squiggly red underlining doesn't go away.
  댓글 수: 2
Michael Amonson
Michael Amonson 2018년 2월 28일
I'm running R2017b and need some method to reorder the callbacks. I can't believe this is so difficult! This is a huge oversight. There should be an easy way of allowing the user to reorder the callbacks. Any insight or guidance would be greatly appreciated!
Matt J, concerning your question about R2017b and suppressing Code Analyzer markup, unchecking the "Enable app coding alerts" box in the View section under the Editor tab is supposed to suppress the alerts, but it has no effects whatsoever.
Jon
Jon 2018년 3월 14일
I submitted the following as a Service Request in August 2017: When building a user interface with App Designer I find that the callbacks get entered into the code in the order that they are created. This is not necessarily the most logical way to organize the code. I would like to reorder the callbacks into a more logical order (e.g. grouping callbacks that all relate to the same underlying controller). I can not find any way to reorder them. Is there a way to do it? Please let me know.
I received the reply: As of R2017a, it is not possible to reorder callbacks in App Designer code. I have notified our development team of this enhancement, and they will consider it for future releases of MATLAB.
I have since updated to 2017B but still have the same problem. I really would prefer to move ahead using App Designer rather than going back to using Guide, but this inability to reorder the callbacks is a real obstacle. I hope that this gets some elevated priority from the developers soon.

댓글을 달려면 로그인하십시오.

채택된 답변

Melissa Williams
Melissa Williams 2018년 3월 16일
Regarding the undoing of deleting a callback, it is undoable. You can either use keyboard shortcut ctrl+z (Be sure to click on the component browser to give the window focus, there was a bug using the context menu that focus got lost). Or you could switch to design view and use the buttons in the toolbar.
When you are in code view, those buttons control undo and redo actions in the editor. When you are in design view the buttons handle all actions outside the editor. The keyboard shortcuts work based on what has focus.
Regarding callback reordering, we are aware this is a painful limitation and are working on improving the experience.
Regarding the turning off the code analyzer, this is not currently possible in App Designer. The "enable app coding alerts" is a separate feature specific to addition alerts App Designer displays to help with Obeject Oriented coding and some graphics limitations. It does not control the code analyzer. I've added a request to add control for code analyzer.
Thanks for the feedback! Melissa
  댓글 수: 6
Iddo Weiner
Iddo Weiner 2019년 2월 4일
Joining the request for updates on reordering callbacks.. Any news?
Melissa Williams
Melissa Williams 2019년 2월 4일
Hi, Please see the answer below, you can try out the 19a pre-release with this capability.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Melissa Williams
Melissa Williams 2018년 12월 12일
Hi everyone,
The R2019a pre-release is live as of today. If you have access to it, you can try out:
  • reordering your callbacks in App Designer by dragging and dropping them in the Code Browser Callbacks tab (to the left of the Editor window in Code View).
  • turning off Code Analyzer - in the MATLAB preferences panel, under Code Analyzer, turn off "Enable integrated warnings and error messages" This change will take effect in both the MATLAB and App Designer editors. (If you already had turned it off for the MATLAB editor, it should just be off in App Designer).
  댓글 수: 16
Jens Haldrup
Jens Haldrup 2019년 7월 12일
Will you consider making it possible to reorder elements in the component browser also?
Matt J
Matt J 2020년 1월 29일
I agree - reordering the component browser is also important.

댓글을 달려면 로그인하십시오.


CallumP
CallumP 2020년 2월 9일
Can't help with the code analyser markyup but I wrote this: https://uk.mathworks.com/matlabcentral/fileexchange/71838-hierarchyviewer which allows you to reorder components and callbacks.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by