Use of matlab.apps.AppBase outside of AppDesigner
Mostrar comentarios más antiguos
I started a project using AppDesigner, but migrated to a programmatically created app, using the code in AppDesigner as a guide (.m files only, no .mlapp files)
My code works, but uses the following features that I'm struggling to find in the documentation (in MATLAB Help Center)
- matlab.apps.AppBase
- matlab.apps.createCallbackFcn()
- registerApp()
- runStartupFcn()
All these come from the code exported from AppDesigner.
What little information I've found keeps referring to them interacting with AppDesigner, which I'm no longer using, so this information seems not relevant to my use. Or I don't understand the use of the term 'AppDesigner' in this context.
So, should I be migrating away from these constructs? if yes, how do I do that? If no, how do I find the documentation for them (which will be needed for my code review)?
Respuestas (1)
It's not clear why you would need to migrate away from them if they do what you want. If you need a deeper understanding of what they do, you could examine their code. They are all implemented as editable mfiles.
>> edit matlab.apps.createCallbackFcn
>> edit matlab.apps.AppBase
>> edit registerApp
>> edit runStartupFcn
>> edit appdesigner.internal.service.AppManagementService
4 comentarios
Steve
el 7 de En. de 2026
It's stil not entirely clear to me who is doing this "code review" and what it's requirements are.
Even setting aside App Designer, Matlab is replete with end-user tools which are documented, but which may call MathWorks internal mfunctions that do not have public-facing documentation (because end-users are not expected to repurpose them). Are you saying you are prevented from using a Matlab command in your projects unless every dependent function from the top to bottom of its dependency tree is documented? That seems impossible.
Or is the rule that only top level, entry point functions are to be limited to documented functions? If so, an easy way to circumvent the problem is to wrap your app in your own "appLauncher.m" file, so that the app code is no longer top level.
Well, the bottom line answer to your question, I believe, is no, there is no public facing documentation for internal Matlab functions like the ones you've listed. You can try to migrate away from them, but you will have to reverse engineer them from their Mcode if you want to know precisely what they do.
But even if you do deduce precisely what they do, I wonder what you think you could migrate to that would avoid the same problem. I think just about every documented Matlab command (that ships as MCode) calls some kind of internal function. There is no refuge from this issue just by not using App Designer.
I'm not a software engineer by trade but I do seem to recall hearing from software engineer colleagues that there was some accepted way of integrating blackbox 3rd party code. Could you not fall back on that?
Categorías
Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!