Info
此问题已关闭。 请重新打开它进行编辑或回答。
GUI with guide, statements around the functions
1 次查看(过去 30 天)
显示 更早的评论
Hello, Im building a pretty large GUI with guide and im stuck behind that i cannot use statements around the accual callback functions. Is this something that can be done at all?
I saw something about creating an own function and re-lable the functions for the Components in the GUI. it is possible to make the entire GUI behind a functions with multiple functions behind it?
Another question is how i can use the variables from the workspace back to my GUI again, im sending some to the WS to be able to use them in a diffrent background script, and then send them back to a plot inside the GUI.
Thanks
1 个评论
Adam
2017-5-5
编辑:Adam
2017-5-5
What do you mean by 'statements around the actual callback functions'?
Callbacks are, by their nature, triggered by the UI components for which they are callbacks. That is their sole purpose.
As far as workspace goes, use the GUI's own workspace(s). Each callback has its own workspace and can call functions just like you can from the base workspace or a script. It doesn't make any sense to have variables dumped to the base workspace from a GUI normally because if the person using the GUI has access to the workspace they might as well just create the variables there directly without bothering with the GUI!
回答(1 个)
Santhana Raj
2017-5-5
U can use statements 'around' callback functions. You have to be more clear on this.
Since you are new to GUIDE, I would advise you not to do that. But instead call these self created functions from the callback functions
Instead of taking data to WS and then back in, Use the structure "handles." This is passed on to all functions and if used properly, work like a charm.
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!