Call value from KeyPressFcn GUI to another function m file

3 vues (au cours des 30 derniers jours)
Bakka
Bakka le 31 Jan 2014
Hi everyone, I have 1 GUI that user put value on edittext, and other .m file must call it for do some calculation. how can I do that? need your advice, many thanks.
for example : here is code from GUI #1 (Form_Embedd)
function edt_katakunci_KeyPressFcn(hObject, eventdata, handles)
%this is function when user type password on edittext box
pass = get(handles.edt_katakunci,'UserData');
set(handles.edt_katakunci,'UserData',pass)
and I need call the value to another m file for convert value as hex and hex value calculate on m file (convert.m).
on .m file (convert.m) value from form_main edt_katakunci called and stored into this code
Form_Embedd(edt_katakunci_KeyPressFcn(pass))
kata=pass;
kunci=sprintf('%X', kata);
but when I run this code the result is
??? Undefined function or variable 'pass'.*
  1 commentaire
Shivaputra Narke
Shivaputra Narke le 31 Jan 2014
Modifié(e) : Shivaputra Narke le 31 Jan 2014
what is the aim of following code?
pass = get(handles.edt_katakunci,'UserData');
set(handles.edt_katakunci,'UserData',pass)
?
Can you explain in detail?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Adding custom doc dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by