Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work in MatLab 2016b #24

Open
burf2000 opened this issue Oct 5, 2016 · 8 comments
Open

Does not work in MatLab 2016b #24

burf2000 opened this issue Oct 5, 2016 · 8 comments

Comments

@burf2000
Copy link

burf2000 commented Oct 5, 2016

I run launch and get

Error using getappdata
Value must be a handle.

Error in GridLayout/Update (line 282)
OldPosition = getappdata(Obj.Container,'Position');

Error in GridLayout>@(hsrc,ev)Update(Obj,true)

Error using GridLayout (line 70)
Error while evaluating UIContainer SizeChangedFcn

Undefined function or variable 'fHG1Client'.

Error in simiam.ui.AppWindow/create_layout (line 212)
jClient = jFrame.fHG1Client;

Error in simiam.ui.AppWindow/load_ui (line 72)
obj.create_layout();

Error in launch (line 20)
app.load_ui();

@XiGuaSZ
Copy link

XiGuaSZ commented Jul 27, 2017

I get the same errors in matlab 2016a

@billtubbs
Copy link

billtubbs commented Jan 1, 2020

I get similar errors in MATLAB R2019b (and a few warnings).

>> launch
Error using getappdata
Value must be a handle.

Error in GridLayout/Update (line 282)
            OldPosition = getappdata(Obj.Container,'Position');

Error in GridLayout>@(hsrc,ev)Update(Obj,true) (line 72)
                'ResizeFcn', @(hsrc,ev)Update(Obj,true), ...
 
Error using GridLayout (line 70)
Error while evaluating UIContainer SizeChangedFcn.

Warning: The JavaFrame figure property will be removed in a future release. For more information, see Recommendations for Java
and ActiveX Users on mathworks.com. 
> In findjobj/getRootPanel (line 383)
  In findjobj (line 216)
  In simiam.ui/AppWindow/create_layout (line 140)
  In simiam.ui/AppWindow/load_ui (line 72)
  In launch (line 20) 
Warning: The JavaFrame figure property will be removed in a future release. For more information, see Recommendations for Java
and ActiveX Users on mathworks.com. 
> In findjobj/getRootPanel (line 383)
  In findjobj (line 216)
  In simiam.ui/AppWindow/create_layout (line 183)
  In simiam.ui/AppWindow/load_ui (line 72)
  In launch (line 20) 
Warning: The JavaFrame figure property will be removed in a future release. For more information, see Recommendations for Java
and ActiveX Users on mathworks.com. 
> In findjobj/getRootPanel (line 383)
  In findjobj (line 216)
  In simiam.ui/AppWindow/create_layout (line 190)
  In simiam.ui/AppWindow/load_ui (line 72)
  In launch (line 20) 
Warning: The JavaFrame figure property will be removed in a future release. For more information, see Recommendations for Java
and ActiveX Users on mathworks.com. 
> In findjobj/getRootPanel (line 383)
  In findjobj (line 216)
  In simiam.ui/AppWindow/create_layout (line 195)
  In simiam.ui/AppWindow/load_ui (line 72)
  In launch (line 20) 
Warning: The JavaFrame figure property will be removed in a future release. For more information, see Recommendations for Java
and ActiveX Users on mathworks.com. 
> In simiam.ui/AppWindow/create_layout (line 211)
  In simiam.ui/AppWindow/load_ui (line 72)
  In launch (line 20) 
Unrecognized function or variable 'fHG1Client'.

Error in simiam.ui.AppWindow/create_layout (line 212)
            jClient = jFrame.fHG1Client;

Error in simiam.ui.AppWindow/load_ui (line 72)
            obj.create_layout();

Error in launch (line 20)
app.load_ui();

I appreciate it's been a while since this tool was developed (5 years!) so maybe shouldn't expect it to work today. How serious are these bugs and what would it take to update the code? (Happy to help if it's within my capabilities).

@billtubbs
Copy link

billtubbs commented Jan 1, 2020

Actually there's a post about this error on the Mathworks help forum here:

There is one answer that recommends the following:

Change the code to jClient = jFrame.fHG2Client;

Somebody else explains:

The code is designed to work with Matlab's HG1 graphics. It will not run with modern Matlab versions. Ask the authors for instructions.

This seems to eliminate the last error.

@billtubbs
Copy link

billtubbs commented Jan 1, 2020

I managed to hack my way past the immediate errors (see here for example) but then the UI launches and there are still lots of problems (e.g. text on buttons missing) so I guess this is going to be more than just a quick-fix:

matlab_screenshot

@jtisaacs
Copy link

@billtubbs Any luck getting the simulator fully working on a newer version of MATLAB?

@billtubbs
Copy link

@jtisaacs I was using version R2019b. I haven’t tried anything more recent.

@jtisaacs
Copy link

I have it working now on R2020a. Beyond the fixes that you mention above I had to make changes to the AppWindow function to make the images show up on the buttons. The problem seemed to be with using img paths when I was using the html strings, so I switched to loading the image and setting the 'cdata' field.

@adumont
Copy link

adumont commented Jul 8, 2020

I have it working now on R2020a. Beyond the fixes that you mention above I had to make changes to the AppWindow function to make the images show up on the buttons. The problem seemed to be with using img paths when I was using the html strings, so I switched to loading the image and setting the 'cdata' field.

@jtisaacs would you mind sharing how you fixed it? Maybe you can upload it to Github (or submit a pull request).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants