Reference to non-existent field error when opening another gui from main gui

1 回表示 (過去 30 日間)
Nishat Anjum Shaikh
Nishat Anjum Shaikh 2012 年 2 月 7 日
編集済み: David 2013 年 10 月 2 日
I have two guis. Gui1 has a button btn_open_gui2 clicking on which opens my gui2. Now, in gui2, I have declared a variable in the opening function as
handles.flag=1 handles.output = hObject; guidata(hObject, handles);
and I have used this flag variable in some button_callbacks, say, gui2_button1 in this same gui2. When I run gui2, everything is working fine. But when I run gui1 and open gui2 from my btn_open_gui2 and then click on gui2_button1, I get this error
Reference to non-existent field 'flag'.
  1 件のコメント
Nishat Anjum Shaikh
Nishat Anjum Shaikh 2012 年 2 月 7 日
I think there is some error in using handles.
Please help!!

サインインしてコメントする。

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by