On Sun, 1 Feb 2009 20:32:37 -0600, Darren Gitelman
<[log in to unmask]> wrote:
>Stephen
>
>You are correct. Any toolboxes that are available through the batch system
>and use xx_config_yy files are added to the path at the time SPM is started.
>See spm_config.m around line 259.
Right, I saw that line of code.
However, as far as I can tell that's not how SPM originally dealt with
toolboxes. spm.m has code which adds the toolbox to the matlabpath upon
its selection from the dropdown menu.
That's the way SPM2 apparently dealt with it. For SPM5, some toolboxes do it
that way; others do it through spm_config.m.
Adding paths without the users having selected the toolbox can lead to
unwanted name collisions. There's already one example of that, the VBM5
toolbox with spm_getSPM, spm_list, and spm_results_ui.
>-----
>Darren Gitelman
>
>
>On Sun, Feb 1, 2009 at 7:22 PM, Stephen J. Fromm
<[log in to unmask]>wrote:
>
>> I noticed that in my most recent copy of SPM5 and its updates, many
>> toolboxes were adding themselves to the matlab path after I started SPM
and
>> pushed the "fMRI" button. (Equivalently, after I started SPM by typing spm
>> ('fmri') in matlab.)
>>
>> For a toolbox named "X", the line that caused this was in the file
>> .../toolbox/X/spm_config_x.m
>> and the line is of the form
>> addpath(fullfile(spm('dir'),'toolbox','X'));
>>
>> My impression is that that line shouldn't be there, and it seems that
>> that's the
>> line that puts the toolboxes in the matlab path even before any toolbox has
>> been selected using the menu on the main SPM5 window.
>>
>
|