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

Undefined function or variable 'hFig'. #22

Open
brianbaloch opened this issue Aug 15, 2016 · 13 comments
Open

Undefined function or variable 'hFig'. #22

brianbaloch opened this issue Aug 15, 2016 · 13 comments

Comments

@brianbaloch
Copy link

I am using BCILAB-devel-1.4 version. it has only one problem. it gives an error of undefined function or variable 'hFig' . below is given error
Error in vis_artifacts/on_resize (line 299)
wPos = get(hFig,'Position');

@cboulay
Copy link

cboulay commented Aug 15, 2016

Just for convenience's sake, here is a link to the offending line.

If you put a break point on line 169, after hFig is created but before on_resize is called, does hFig exist? (I'm actually checking to see if on_resize somehow gets called before hFig is created)

@brianbaloch
Copy link
Author

when I wrote dbstop in on_resize; after line 169. i got same error

@cboulay
Copy link

cboulay commented Aug 15, 2016

Sorry, not after line 169. I meant immediately before line 169. (I use the Matlab IDE and just click on the margin of the line I want to break, hence why I said "on", but really it's right before that line).

@brianbaloch
Copy link
Author

ok dear

@brianbaloch
Copy link
Author

dear figure is empty

@brianbaloch
Copy link
Author

dear figure is empty . and giving the following errors . I mean same error.

# Undefined function or variable 'hFig'.
Error in vis_artifacts/on_resize (line 301)
wPos = get(hFig,'Position');
Error in vis_artifacts/on_window_resized (line 313)
on_resize();
Error using vis_artifacts (line 167)
Error while evaluating Figure SizeChangedFcn
You might see this error due to a behavior change in the ResizeFcn callback.
See ResizeFcn Returns Error After GUI Launches for more information.

@brianbaloch
Copy link
Author

These are the same errors which i get after break point (just before the line 169).

@cboulay
Copy link

cboulay commented Aug 15, 2016

OK, the error message explains it.
While I don't have BCILAB installed to confirm, my guess is it is the same error as described here.

Can you confirm that you're running a version of Matlab >= R2014b?

Right after hFig is set on line 167, add the following:
set(hFig, 'Visible','on');

@brianbaloch
Copy link
Author

I am using MATLAB 2015b

@brianbaloch
Copy link
Author

Error is still there. sir please need your help

@cboulay
Copy link

cboulay commented Aug 15, 2016

Sorry, I don't have BCILAB installed. I was just going based on the errors you described. Compare the code in your vis_artifacts.m file to the one currently in the devel branch of this repository to see if they are identical around lines 167-169. If they aren't then my advice will not work because the edits will have to happen on slightly different lines.

Other than that I can't help you.

@brianbaloch
Copy link
Author

Thanks Sir

@brianbaloch
Copy link
Author

Thanks. But the problem is still existing. I checked by comparing it to current devel branch of repository.

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

2 participants