Stop a mask callback from being called to not display it

조회 수: 2 (최근 30일)
Adrian Dronca
Adrian Dronca 2013년 3월 5일
Hello all,
I have a mask subsystem. I saw that the MaskCallback is called when the user double-clicks it.
In that callback i`m checking a variable. Depending on the value I want to open the mask or not.
My problem is that I do not know how to stop the mask from opening.
Any idea is appreciated :)
Thanks in advance,
Adrian

채택된 답변

TAB
TAB 2013년 3월 6일
Instead of using MaskCallback, you can use blocks OpenFcn callback to implement your requirement. In OpenFcn callback you can decide when to open the Mask dialog.
For example in OpenFcn callback
if Var==TRUE
open_system(gcbh, 'mask'); % open mask dialog
else
% Do nothing
end

추가 답변 (2개)

Kaustubha Govind
Kaustubha Govind 2013년 3월 5일
I don't think you can prevent the Mask Dialog from opening - what would you have it do? Throw an error, or have a no-op? However, perhaps it is better to simply make all the parameters invisible, so that when the Mask Dialog opens, it is empty.

Adrian Dronca
Adrian Dronca 2013년 3월 6일
That is what I wanted. Thank you!

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by