Error Using convertToGUIDECallbackArguments(app, event)
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Athul Prakash
el 24 de Oct. de 2020
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.
Respuestas (1)
Athul Prakash
el 24 de Oct. de 2020
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.
0 comentarios
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!