- Ensure that you have declared/assigned the variable 'lb' before setting its parameter.
- Debug your code, set a breakpoint at this line of code, and then hover the cursor over the object. If it is defined, you will see a pop up with their value, and they will be listed in the Workspace panel.
- Make sure that you do not delete the object before referring to it while setting its parameter.
- Check that the variable has the correct data type, and has a property 'UserData'.
When I try to open the SPM12 gui for CAT12 I get the following error. I open the gui by typing in the interface
5 次查看(过去 30 天)
显示 更早的评论
Error using matlab.ui.control.UIControl/set
Invalid or deleted object.
Error in cfg_getfile>update (line 733)
set(lb,'UserData',dr);
Error in cfg_getfile>selector (line 620)
update(wd)
Error in cfg_getfile (line 193)
[t,sts] = selector(varargin{:});
Error in cfg_ui_util>local_valedit_files (line 618)
[val, sts] = cfg_getfile(contents{1}{1}, contents{2}{1}, itemname, inifile, contents{3}{1}, contents{4}{1});
Error in cfg_ui_util (line 438)
[val, sts] = local_valedit_files(ciid, itemname, val);
Error in cfg_ui>local_valedit_EditValue (line 404)
cfg_ui_util('valedit_EditValue', ciid, itemname, val);
Error in cfg_ui>BtnValEditVal_Callback (line 1013)
local_valedit_EditValue(hObject);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in cfg_ui (line 53)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)cfg_ui('BtnValEditVal_Callback',hObject,eventdata,guidata(hObject))
Error using cfg_ui>local_showvaledit
Error while evaluating UIControl Callback.
0 个评论
回答(1 个)
arushi
2024-7-2
Hi Megan,
I understand from your question that you are encountering an error saying 'Invalid or deleted object.' The error occurs when you try to set the 'UserData' parameter of the 'lb' object.
The error message indicates that the object 'lb' does not exist, or may have been deleted/overwritten. You can do the following to try and resolve the error:
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!