mexopencv
mexopencv copied to clipboard
Modifications to make.m
Few suggestions to make.m runngin Octave
- since Octave default is "more on", it should be changed locally.
- until https://savannah.gnu.org/bugs/?46849 will be fixed, stopping the shadow warnings:
if mexopencv.isOctave()
% Octave default is more on
page_screen_output (false, 'local');
% until https://savannah.gnu.org/bugs/?46849 will be fixed
warning ('off', 'Octave:shadowed-function');
end
Since https://savannah.gnu.org/bugs/?45364 was fixed in the dev. branch of Octave, a cancelleation button can be add if Ocave version > 4.0.3
if ~mexopencv.isOctave()
cancellation = {'CreateCancelBtn','setappdata(gcbf,''cancel'',true)'};
else
octave_version = OCTAVE_VERSION;
if (compare_versions (octave_version, '4.0.3', '>'))
% HACK: https://savannah.gnu.org/bugs/?45364 will be fixed in 4.2
cancellation = {'CreateCancelBtn','setappdata(gcbf,''cancel'',true)'};
else
cancellation = {};
end
end
Thanks,
Avinoam
@AvinoamK Thanks, I added your first suggestion in PR #268
I chose not to implement latter ones, I think it is better to leave that choice to the user if they want to silence warnings, even if they are false-positives..
As for the cancel button, I say we wait until it is part of a stable octave release. There still could be an intermediate version(s) between the current 4.0.3 and the 4.2 milestone, in which case your if-statement would be incorrect.
Thanks for adding the pager issue. I do not think there will be an intermediate version of Octave, since there is already a release candidate for 4.2 (http://alpha.gnu.org/gnu/octave/octave-4.2.0-rc1-installer.exe, http://alpha.gnu.org/gnu/octave/octave-4.2.0-rc1.tar.xz), but I can wait for 4.2 official release.