Error Using convertToG​UIDECallba​ckArgument​s(app, event)

조회 수: 8 (최근 30일)
Sebastian Bustillo
Sebastian Bustillo 2020년 10월 20일
댓글: Athul Prakash 2020년 10월 24일
Hi everyone,
I've been working on migrating GUIs from GUIDE to App Designer with the Migration Tool. Recently, I migrated a very complex GUI that calls multiple GUIs at the same. However, this is not the problem. The real problem is that when I use the MATLAB function convertToGUIDECallbackArguments as below I get an error:
Reference to non-existent field 'Source'.
Error in CVCRCI_App/WaveformName_Callback (line 3591)
[hObject, eventdata, handles] =
convertToGUIDECallbackArguments(app, event); %#ok<ASGLU>
function WaveformName_Callback(app, event)
% Create GUIDE-style callback args - Added by Migration Tool
[hObject, eventdata, handles] = convertToGUIDECallbackArguments(app, event); %#ok<ASGLU>
%If it is changed, then resets values, otherwise it just updates
POS=get(handles.WaveformPV,'value');
WID=get(handles.WaveformName,'value');
...
end
It seems like the variable event that's being passed into convertToGUIDECallbackArguments(app, event); %#ok<ASGLU> does not have a field called "Source".
So, my question is: how can I circumnavigate this problem? Should I define a global property for event?
  댓글 수: 1
Athul Prakash
Athul Prakash 2020년 10월 24일
The issue seems related to this type of component not having a 'source' property that is being called by the given function. If you can provide more of your code, perhaps a working portion of this Callback component, the problem can be investigated further.

댓글을 달려면 로그인하십시오.

답변 (1개)

Athul Prakash
Athul Prakash 2020년 10월 24일
Hi Sebastian,
The 'event' object seen here typically has different properties depending on which type of event it is responding to. You may check the properties page of the component that event is listening to and check if 'source' exists there.
Additionally, I would recommend double-checking that the issue is not part of any of the special considerations mentioned in this doc: https://in.mathworks.com/help/matlab/creating_guis/differences-between-app-designer-and-guide.html.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by