Call value from KeyPressFcn GUI to another function m file
显示 更早的评论
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 个评论
Shivaputra Narke
2014-1-31
编辑:Shivaputra Narke
2014-1-31
what is the aim of following code?
pass = get(handles.edt_katakunci,'UserData');
set(handles.edt_katakunci,'UserData',pass)
?
Can you explain in detail?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Adding custom doc 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!