It seems my mistake was trying to use getGuiArgs first, which misled me. When I started, I had something more similar to your program -- I don't think I actually used List.reverse, though I should have. But it didn't work with getGuiArgs, so I did some browsing and testing until I empirically found the way to get want I wanted with getGuiArgs, and then it wouldn't work with getArgs/getCmdArgs.
The problem seems to be that getGuiArgs doesn't return in the same format that getArgs does with command line arguments; getArgs seems to work the way the docs suggest all three of getArgs, getCmdArgs, and getGuiArgs should.
If I do it your way it works fine, of course -- unless I replace getArgs with getGuiArgs, in which case it gives an error very similar to the one I was getting with my version with getArgs or getCmdArgs:
%******************** Error: conditional failed *****************
%**
%** Missing else clause
%**
%** Matching: optRec([[109 101 108 108 111 119] [121 101 108 108 111 119]])
%** in file "/home/kost/compile/build-1.3.0/updates/mozart/share/lib/base/List.oz", line 70
%**
%** Call Stack:
%** procedure 'DoReverse' in file "/home/kost/compile/build-1.3.0/updates/mozart/share/lib/base/List.oz", line 67, column 3, PC = 10673080
%** procedure in file "c:/Documents and Settings/Chris/My documents/ohce2.oz", line 1, column 0, PC = 10671600
%** procedure 'RootManager,Pickle/fast' in file "d:/cygwin/home/bruni/Projects/Mozart/Sources/share/lib/init/Module.oz", line 244, column 6, PC = 10648000
%** procedure in file "/home/kost/compile/build-1.3.0/updates/mozart/share/lib/base/Base.oz", line 92, column 7, PC = 10706916
%**--------------------------------------------------------------
_________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
