Why my GUI (made with guide) opens with a specific image on my computer, and gives error while loading another one?
1 view (last 30 days)
Show older comments
Arif ul Maula
on 22 Mar 2016
Commented: Arif ul Maula
on 12 Apr 2016
This is the error I get, when I try to load new image (the image is loaded my moving cursor on GUI gives this error):
*Error while evaluating Figure WindowButtonMotionFcn
Error using matlab.graphics.primitive.Image/get Invalid or deleted object.
Error in impixelinfoval/displayPixelInfo (line 126) elseif strcmp(get(him,'tag'),'rset overview')
Error in iptaddcallback/callbackProcessor (line 147) fun(varargin{:});
Error while evaluating Figure WindowButtonMotionFcn*
Previously it was working fine. Now when I load the GUI by running .m file, it opens in one folder above and not in the same folder :(. Please help!!! I am using MATLAB 2016a
2 Comments
Adam
on 22 Mar 2016
You haven't given enough information. We don't know what is in your WindowButtonMotionFcn.
If it is doing something expecting an image to be there, but you have temporarily deleted the image while you load another one then that would lead to something similar to that.
I'm not really sure what you mean about the folder in which it opens and how that related to the error you mention.
Accepted Answer
Image Analyst
on 23 Mar 2016
Edited: Image Analyst
on 23 Mar 2016
Most likely you're not specifying the full filename properly.
See the FAQ: http://matlab.wikia.com/wiki/FAQ#Why_can.27t_my_standalone_compiled_executable_find_my_files.3F
Also, let's see what you do between calling uigetdir() and imread() or whatever.
More Answers (0)
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!