Changeset 181


Ignore:
Timestamp:
Dec 16, 2011, 12:16:11 PM (6 years ago)
Author:
tjniskan
Message:
  • Added a workaround for the uigetfile-bug in OSX version of Matlab, where uigetfile in some situations returns a directory instead of a file. This bug seems to be present at least in R2011a version of Matlab.

M aedes_getfilefilter.m
M aedes_data_read.m
M aedes_revision.m

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • aedes_data_read.m

    r174 r181  
    8080        DATA=[];
    8181        return
    82   end
    83   filename = fullfile(f_path,f_name);
    84   dataformat = aedes_getdataformat(filename);
     82        end
     83       
     84        filename = fullfile(f_path,f_name);
     85       
     86        % There is a bug in uigetfile in OSX version of Matlab and the
     87        % fid-directory may be returned instead of the fid-file.
     88        if ismac
     89                if length(f_name)>3 && strcmpi(f_name(end-3:end),'.fid')
     90                        filename = [filename,filesep,'fid'];
     91                end
     92        end
     93        dataformat = aedes_getdataformat(filename);
     94       
    8595 
    8696elseif nargin>=1
  • aedes_getfilefilter.m

    r174 r181  
    8888  ''}';
    8989
     90% Uigetfile is broken in OSX version of Matlab (at least R2011a), and
     91% doesn't work with filters that are not file extensions (e.g. fid or
     92% 2dseq).
     93if ismac
     94        filefilt{1,1} = '*.*';
     95        filefilt{1,2} = 'All Files';
     96end
     97
    9098% - EOF -
  • aedes_revision.m

    r180 r181  
    9393% bash-script every time it is called so that this file "aedes_revision.m" is
    9494% always in the list of committed files. DO NOT EDIT THE NEXT LINE!!!
    95 % - Svn Hook -
     95% - SVN Hook -
Note: See TracChangeset for help on using the changeset viewer.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008