How to share data between two apps which is made from app designer?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When I use guide in matlab, I used to use setappdata and getappdata function to share data between different gui. At this time I made two app using app designer, how to share data between two apps?
0 commentaires
Réponses (2)
Dave Behera
le 24 Mar 2016
Datasharing in App Designer can be done by creating and using properties. See this link:
Also, check this link for an example:
Chris Portal
le 10 Avr 2016
One way of doing this would be:
- Create a private property in App1 called SharedData. Initialize it to a default value that you can reliably check later to determine if App2 has set it yet or not.
- Create a public function in App1 called setSharedData(app, newdata) which does any necessary checking before setting app.SharedData to newdata
- When App1 needs to call App2, check whether app.SharedData is set to the default value from step #1. If it is, tell App2 to open. Otherwise, tell App2 to just send data.
0 commentaires
Voir également
Catégories
En savoir plus sur Language Support dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!