admin管理员组文章数量:1332382
I am attempting to create a MATLAB app programmatically to have it be more anized. As such I have split up code into different files based on what it does, I have one file to initialize the buttons on the screen. When I attempt to build a function callback for a button I seem to successfully build it. No errors are shown in the terminal, however I get an audible Windows Error noise and the callback action is not triggered. Here is my code:
function obj = selectLoad( grid )
%Create file load 1
obj.fileLoad1 = uibutton(grid, 'push');
obj.fileLoad1.FontSize = 36;
obj.fileLoad1.Layout.Row = [8 9];
obj.fileLoad1.Layout.Column = 1;
obj.fileLoad1.Text = 'Load 1';
obj.fileLoad1.ButtonPushedFcn = {@fileLoad1Callback};
end
function fileLoad1Callback(src, event)
fileLoad1.Text = 'Ice Cream';
end
grid here is an argument I pass from my main initilization file that has the uigridlayout for the entire app. No error code is present so it is very difficult for me diagnose the issue.
本文标签: MATLAB Programmatic App Fcn Callback not workingStack Overflow
版权声明:本文标题:MATLAB Programmatic App Fcn Callback not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742293872a2448331.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论