필터 지우기
필터 지우기

App: differentiate shared callback

조회 수: 2 (최근 30일)
Jessica Hiscocks
Jessica Hiscocks 2018년 5월 18일
댓글: Jessica Hiscocks 2018년 5월 19일
In the app, I want to share a callback between two buttons (app.Button1 and app.Button2). However, I want the action to be slightly different if Button1 is pushed vs Button2: something on the order of x=1 vs x=3.
Is there a way to detect, in the callback, which button triggered it?
(Matlab 2018a)
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2018년 5월 18일
Jessica - what does the signature for your callback look like? Isn't there a src input parameter?
Jessica Hiscocks
Jessica Hiscocks 2018년 5월 19일
Not so far as I can tell- that seems to only apply if you create the button programmatically after the app is running.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by