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

5 vues (au cours des 30 derniers jours)
Sebastian Bustillo
Sebastian Bustillo le 20 Oct 2020
Commenté : Athul Prakash le 24 Oct 2020
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 commentaire
Athul Prakash
Athul Prakash le 24 Oct 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.

Connectez-vous pour commenter.

Réponses (1)

Athul Prakash
Athul Prakash le 24 Oct 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.

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by