-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add function to hide and show the matlab engine #79
Conversation
The two added functions are named I'm open to other suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with?w=0
.
@@ -59,7 +59,7 @@ function close(session::MSession) | |||
# Close a MATLAB Engine session | |||
@assert libeng::Ptr{Void} != C_NULL | |||
ret = ccall(engfunc(:engClose), Cint, (Ptr{Void},), session) | |||
ret != 0 && throw(MEngineError("Failed to close a MATLAB engine session (err = $r)")) | |||
ret != 0 && throw(MEngineError("failed to close a MATLAB engine session (err = $ret)")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the extra space before )
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the review. Not sure where this extra space is? I double checked but I don't see any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
engfunc(:engSetVisible )
below. Apparently @github puts the comment on the wrong line if it was made with whitespace changes removed. You can see it at the right line with https://github.com/JuliaInterop/MATLAB.jl/pull/79/files?w=0 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks again, fixed.
The only problematic issue here is if the user closes the matlab engine window. Because then the pointer to the engine is still attached to a session that does not exist. I'm not sure what the best way to prevent such an occurrence. |
Put a little section in the README for #79
For one this can be useful for debugging.
Also trim leading whitespaces.