Custom library within another custom library

1 次查看(过去 30 天)
I'm trying to create a custom library (A) that uses another custom library (B). This seems rather problematic.
Background: Both (A) and (B) each have a masked parameter, ParA and ParB. When ParA is changed through the dialog its' callback changes the value of ParB; however, ParB's callback isn't executed. (Same thing when I programmatically change ParB: it's callback isn't executed). The net result being a non-expected behavior when trying to change ParB.
Basically: How do I make sure a mask parameter callback is executed after programmatically changing the value of that mask parameter?
Note: It's possible to have (A) change the internals of (B) (to perform callback-B's work) but since it's a library Simulink complains.

采纳的回答

TAB
TAB 2012-6-23
Parameter dialog callback is not executed when parameter value is changed programmatically using set_param() command. See the second box containing note here in the user guide.
Alternatively, you can write your callback code in Initialization Pane of the mask. Code in this pane will be executed every time when the parameter value is changed either from dialog box or programmatically using set_param() .

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Event Functions 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by