The last post has been talked about the data communication in multiwindow app desinger. see Data communication between multiwindow App in Mablab/App designer (1)

Actually, in the App designer, there are two type of functions : public and private.  It’s easy to understand, ‘private’ is only called by the app, can not called by other app. The ‘public’ can be called by other app.

“but”的图片搜索结果

It has some restrictions, here, i’ll give you an example to explain this.

You have a main app for displaying the measured data and three child apps for configuring three measuring instruments, for example, a power meter, a temperature probe and an oscilloscope.

As mentioned in the last post, the public function defined in the main (father) app can be called by any of the child apps. However, a public function defined in a child app CAN NOT be called by another child app. It means the main (father) app can share his public functions to his children. The function defined in the child is private for other childrens.  Thus, we can use this feature to define a ‘real’ public function for all the apps.

06/03/2018 update: actually, a public function is defined in the app, the function is only callable when the app is launched.  Thus, more specifically, it should say: ” the public function defined in a child app is only callable by other apps when the app is launched.”

And there is also anther solution:  you can define the function in matlab workspace (functionname.m) which has all access for all the apps (children and father).

 

 

News Reporter
Dr. Lu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Skip to toolbar