handles using GUIDE, global vs. handles

4 ビュー (過去 30 日間)
James
James 2013 年 6 月 24 日
Matlab Noob:
Is using handles in a GUI as bad as using globals to be able to use variables in different functions? Is there a better method than saving variables to the handles?

採用された回答

Evan
Evan 2013 年 6 月 24 日
編集済み: Evan 2013 年 6 月 24 日
Using the handles structure is a much more neat, simple and safe way of using variables in different functions. It also helps that GUIs and their respective mfiles created using GUIDE are already set up for this type of passing and saving data.
I think that, in the vast majority of cases, taking advantage of the handles structure through the use of functions like guidata() is your best option.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by