フィルターのクリア

setappdata storing variable with 'Settings' type

1 回表示 (過去 30 日間)
TREDWISE
TREDWISE 2015 年 3 月 20 日
コメント済み: TREDWISE 2015 年 3 月 23 日
Hi all,
Here is my code:
function reInit()
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
load('reInitSettings.mat') %contains UD and Settings variables
hMainGui = getappdata(0, 'hMainGui'); %handle for the main figure
setappdata(hMainGui, 'Settings', Settings)
setappdata(hMainGui, 'UserData', UD)
hMainGui=getappdata(hMainGui, 'Settings')
save('test.mat', 'hMainGui', 'Settings')
%%don't worry about anything below this comment
button=findobj('Tag','btConnect');
trigger=get(button,'Callback');
trigger(button,guidata(hMainGui));
When I open 'test.mat', I get the 'Settings' variable which is a 1x1 struct as I expected, and I get the 'hMainGui' variable which is actually a 1x1 Settings (whatever that is). So for some reason setappdata is storing the variable with this unusual format, which doesn't work.
Does anyone have any insight into what is going on here?
Thanks John
  1 件のコメント
TREDWISE
TREDWISE 2015 年 3 月 23 日
anybody??

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by