Plugins-comments

From Bcontrol

REMEMBER TO CALL CommentsSection(obj, 'clear_history') !!!

From the help file (in Matlab, type "help @comments/CommentsSection"):

% [varargout] = CommentsSection(obj, action, varargin)
%
% A plugin that provides a simple text box for jotting down comments about
% the rat. The plugin creates a togglebutton that opens and closes a new
% figure with two textboxes: an overall comments box, intended as a space
% for comments that cover many days or the entire training lifetime of the
% animal; and a detailed comments textbox, intended for the day-by-day comments.
%
% To use, simply add
%
%  >> [x, y] = CommentsSection(obj, 'init', x, y); 
%
% to your protocol's startup.
%
% IMPORTANT NOTE: Since the text boxes are GUI SoloParamHandles, Dispatcher will
% automatically store a history of the comments boxes on every trial. This
% is completely unnecessary. Clearing the history on each trial is
% recommended so as to avoid unnecessary memory hogging. See
% action='clear_history' below.
%
% PARAMETERS:
% -----------
%
% obj         Defaut object argument
%
% action      A string, one of the following:
%
%     'init' x y     RETURNS x, y
%             The 'init' action expects two more parameters, x and y, the
%             pixel position on the current figure on which a button that
%             opens/closes the Comments box figure will be placed. Returns
%             an x and y position suitable for putting in a GUI element
%             that will not overlap with the CommentsSection one.
%
%     'clear_history'
%             It is recommended that this action be called on every trial.
%             Clears any history of both day-by-day and overall comments.
%
%     'get'    RETURNS str
%             The 'get' action returns the char matrix of the day-by-day
%             comments. This matrix is space-padded to the right.
%
%     'set' str
%             The 'set' action takes an extra parameter, a char matrix that
%             will be the new value of the day-by-day comments box.
%
%     'append_line'  str
%             The 'append_line' action takes an extra parameter, a char
%             vector that will be appended to the bottom of the day-by-day
%             comments as a new line.
%
%     'append_date'  
%             This action adds a new line with a string indicating the date
%             at the bottom of the day-by-day comments.
%
%     'close'  
%             Close and delete any figures or SoloParamHandles associated
%             with this section.
%
%     'reinit'
%             Closes and deletes figures and SoloParamHandles associated
%             with this section; then reinitializes, starting at the same
%             point of the same original figure than the last 'init'
%
%
% EXAMPLE:
% --------
%
% On every 'prepare_next_trial', you could do:
%
%    CommentsSection(obj, 'clear_history');
%    if n_done_trials == 1,
%        CommentsSection(obj, 'append_date'); CommentsSection(obj, 'append_line', '');
%    end;
%