Back to the main page.
Bug 1033 - implement a consistent way to return help (or an error)
Status | CLOSED FIXED |
Reported | 2011-10-12 12:00:00 +0200 |
Modified | 2012-04-11 16:48:37 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2011-10-12 12:00:18 +0200
read_spike6mat_data does if nargin < 1 help read_spike6mat_data; return; end; and read_eeglab* all do if nargin < 1 help read_eeglabdata; return; end; is it an idea to consistently do the following? if nargin<1 help(mfilename) return; end
Robert Oostenveld - 2011-10-12 12:01:17 +0200
also the read_spmeeg* functions have the automatic help
Robert Oostenveld - 2011-10-12 12:15:49 +0200
I also noticed functions like private/interp_ungridded that do something like if nargin<3 error('Not enough input arguments.'); end
Robert Oostenveld - 2011-10-17 21:59:27 +0200
see also ft_freqcomparison % nargin check if nargin ~= 3 error('two conditions required for input'); end
Boris Reuderink - 2011-11-17 10:46:47 +0100
Changed the status of bugs without a specific owner to UNCONFIRMED. I'll try to replicate these bugs (potentially involving the submitter), and change confirmed bugs to NEW. Boris
Robert Oostenveld - 2011-12-22 08:58:39 +0100
all FT functions now can use ft_preamble_help
Boris Reuderink - 2012-02-03 22:06:22 +0100
Robert, should these functions be changed to actually use the ft_preamble_help? So far the seem unchanged.
Robert Oostenveld - 2012-02-04 10:37:37 +0100
(In reply to comment #6) Comment 5 should probably have read "all ft mains now USE the preamble". However, I just checked and mbp> grep -L preamble\ help ft_*m ft_appenddata.m ft_appendsource.m ft_appendspike.m ft_appendtimelock.m ft_channelcombination.m ft_channelselection.m ft_compile_mex.m ft_conjunctionanalysis.m ft_defaults.m ft_denoise_pca.m ft_dependencies.m ft_documentationindex.m ft_documentationreference.m ft_interactiverealign.m ft_volumesegment.m ft_wizard.m there are still some that apparently do not use the help preamble.
Robert Oostenveld - 2012-02-04 10:41:53 +0100
(In reply to comment #7) I went through the previous list and fixed the ones where the preamble is appropriate. For ft_conjunctionanalysis I did a more general cleanup. mbp> svn status -u | grep M M 5233 ft_conjunctionanalysis.m M 5233 ft_denoise_pca.m M 5233 ft_interactiverealign.m M 5233 ft_volumesegment.m M 5233 ft_appendsource.m M 5233 ft_appendtimelock.m M 5233 ft_appenddata.m M 5233 ft_appendspike.m mbp> svn commit ft_conjunctionanalysis.m Sending ft_conjunctionanalysis.m Transmitting file data . Committed revision 5237. mbp> svn commit Sending ft_appenddata.m Sending ft_appendsource.m Sending ft_appendspike.m Sending ft_appendtimelock.m Sending ft_denoise_pca.m Sending ft_interactiverealign.m Sending ft_volumesegment.m Transmitting file data ....... Committed revision 5238.