MATLAB: GUI creation script has “matlab.gr​aphics.Gra​phicsPlace​holder/set​” error

gui error

R2015a.
I am using a code that creates a GUI with different tabs. I get an error in the middle of the GUI creation so that part of the GUI pops up, but it is not complete and the script stops. Any ideas
what is wrong?:
Error using matlab.graphics.GraphicsPlaceholder/set
The name 'Userdata' is not an accessible property for an instance of class
'matlab.graphics.GraphicsPlaceholder'.
Error in configpanelUSER (line 64)
set(h.eqdata(18),'Userdata',h.eqdata(19))
Error in splitlab (line 39)
configpanelUSER;
The Script "configpanelUSER" runs as below until the last line below:
% Splitlab Configuration GUI helper function
x = 15;
y = 160;
w = 305;
v = 15;
h.panel(4) = uipanel('Un
if true
% code
endits','pixel','Title','User info','FontSize',10,'Position',[130 205 425 210], 'BackgroundColor', [224 223 227]/255 );
%%field descriptions text
txt = {'User name:';
'Institut:';
'Adress:';
'Phone:';
'Fax:';
'email:'};
for i=0:5
uicontrol('Parent',h.panel(4),'Units','pixel',...
'Style','text',...
'Position',[x y-(i*v*2) 200 20],...
'String', txt{i+1},...
'HorizontalAlignment','Left');
end
%%user and internet settings
x=100;
uicontrol('Parent',h.panel(4),'Units','pixel',...
'Style','Edit',...
'BackgroundColor','w',...
'Position',[x y w 20],...
'String', config.request.user,...
'Callback', 'config.request.user=get(gcbo,''String'');');
uicontrol('Parent',h.panel(4),'Units','pixel',...
'Style','Edit',...
'BackgroundColor','w',...
'Position',[x y-2*v w 20],...
'String', config.request.institut,...
'Callback', 'config.request.institut=get(gcbo,''String'');');
uicontrol('Parent',h.panel(4),'Units','pixel',...
'Style','Edit',...
'BackgroundColor','w',...
'Position',[x y-4*v w 20],...
'String', config.request.adress,...
'Callback', 'config.request.adress=get(gcbo,''String'');');
uicontrol('Parent',h.panel(4),'Units','pixel',...
'Style','Edit',...
'BackgroundColor','w',...
'Position',[x y-6*v w 20],...
'String', config.request.phone,...
'Callback', 'config.request.phone=get(gcbo,''String'');');
uicontrol('Parent',h.panel(4),'Units','pixel',...
'Style','Edit',...
'BackgroundColor','w',...
'Position',[x y-8*v w 20],...
'String', config.request.fax,...
'Callback', 'config.request.fax=get(gcbo,''String'');');
h.eqdata(19) = uicontrol('Parent',h.panel(4),'Units','pixel',...
'Style','Edit',...
'BackgroundColor','w',...
'Position',[x y-10*v-1 w 21],...
'String', char(config.request.usermail),...
'Callback','config.request.usermail=char(get(gcbo,''String''));');
set(h.eqdata(18),'Userdata',h.eqdata(19))

Best Answer

Your code's a bit garbled, but what that error message is trying to say is that when it encounters this line:
set(h.eqdata(18),'Userdata',h.eqdata(19))
the variable eqdata(18) has not been set.
Earlier, when you executed this line:
h.eqdata(19) = uicontrol('Parent',h.panel(4),'Units','pixel',...
You created an array of 19 graphics handles. The first 18 are not initialized, and the 19th is set to a uicontrol. You cannot set or get properties on those 18 uninitialized handles.
Perhaps what you intended to do is to have each of those calls to uicontrol set one of the handles?