NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/util/uisetdir.m

Revision 495 (checked in by cbc, 12 years ago)

Initial import of Stark code.

Line 
1 function theStatus = uisetdir(thePrompt, theInstruction)
2
3 % uisetdir -- Open the destination folder via dialog.
4 %  uisetdir('thePrompt', 'theInstruction') presents the "uiputfile"
5 %   dialog with 'thePrompt' and 'theInstruction', for selecting the
6 %   desired destination folder.  The returned status is logical(1)
7 %   if successful; otherwise, logical(0).
8  
9 % Copyright (C) 1997 Dr. Charles R. Denham, ZYDECO.
10 %  All Rights Reserved.
11 %   Disclosure without explicit written consent from the
12 %    copyright owner does not constitute publication.
13  
14 % Version of 03-Jul-1997 09:16:00.
15
16 if nargin < 1, thePrompt = 'Open The Destination Folder'; end
17 if nargin < 2, theInstruction = 'Save If Okay'; end
18
19 theFile = 0; thePath = 0;
20 [theFile, thePath] = uiputfile(theInstruction, thePrompt);
21
22 status = 0;               
23 if isstr(thePath) & any(thePath)
24    status = 1;
25    eval('cd(thePath)', 'status = 0;')
26 end
27
28 if nargout > 0, theStatus = any(any(status)); end
Note: See TracBrowser for help on using the browser.