Call value from KeyPressFcn GUI to another function m file

2 views (last 30 days)
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 Comment
Shivaputra Narke
Shivaputra Narke on 31 Jan 2014
Edited: Shivaputra Narke on 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?

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!