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

11 次查看(过去 30 天)
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