I'm not sure you posted the whole code for your capture button's push callback, but I don't see you setting your edit box's String
property anywhere.
set(hEditBox,'String',newName);
If you are setting fields in handles
, don't forget to guidata(hObject,handles)
.