Changeset 623 for trunk/src/civ.m


Ignore:
Timestamp:
Apr 29, 2013, 11:27:46 PM (11 years ago)
Author:
sommeria
Message:

waitbar system for series improved to aloow use as stand alone fcts.

to add at the head of series fcts:
hseries=findobj(allchild(0),'Tag','series');
RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
WaitbarHandle?=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series

call to waitbar:

update_waitbar(WaitbarHandle?,index/nbfield)
if ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction?'),'queue')

disp('program stopped by user')
break

end

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r621 r623  
    17301730[tild,message]=fileattrib(RootPath);
    17311731if ~isempty(message) && ~isequal(message.UserWrite,1)
    1732     errormsg=['No writting access to ' RootPath];
     1732    errormsg=['No writing access to ' RootPath];
    17331733    return
    17341734end
     
    20012001                    errormsg=['cannot create ' subdir_civ1_new ': ' msg1];
    20022002                    return
    2003                 else
     2003                elseif isunix
    20042004                    [xx,msg2] = fileattrib(fullfile(RootPath,subdir_civ1_new),'+w','g'); %yield writing access (+w) to user group (g)
    20052005                    if ~strcmp(msg2,'')
     
    21162116        if ~exist(fullfile(RootPath,subdir_civ2_new),'dir')
    21172117            [xx,m2]=mkdir(fullfile(RootPath,subdir_civ2_new));
     2118            if isunix
    21182119            [xx,msg2] = fileattrib(fullfile(RootPath,subdir_civ2_new),'+w','g'); %yield writing access (+w) to user group (g)
    21192120            if ~isequal(m2,'')
    21202121                errormsg=['cannot create ' fullfile(RootPath,subdir_civ2_new) ': ' m2];
    21212122                return
     2123            end
    21222124            end
    21232125        end
     
    21482150            if ~exist(fullfile(RootPath,subdir_civ2_new),'dir')
    21492151                [xx,m2]=mkdir(subdir_civ2_new);
     2152                if isunix
    21502153                 [xx,msg2] = fileattrib(fullfile(RootPath,subdir_civ2_new),'+w','g'); %yield writing access (+w) to user group (g)
    21512154                if ~isequal(m2,'')
    21522155                    errormsg= ['cannot create ' fullfile(RootPath,subdir_civ2_new) ': ' m2];%error message for directory creation
    21532156                    return
     2157                end
    21542158                end
    21552159            end
     
    41284132    case {'civ_matlab','civ_matlab.sh'}
    41294133        filename=regexprep(Param.OutputFile,'(.+)([/\\])(.+$)','$1$20_XML$2$3.xml');
     4134        if isunix
    41304135        fileattrib(fileparts(filename),'+w +x','o g');% set writting access
     4136        end
    41314137        save(struct2xml(Param),filename);
    41324138end
Note: See TracChangeset for help on using the changeset viewer.