Mercurial > projects > dwt-linux
diff dwt/program/Program.d @ 255:5a30aa9820f3
removed tango.stdc.stringz imports and allow null for arrays and string arguments.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 15 Jun 2008 22:32:20 +0200 |
parents | ce446666f5a2 |
children | c0d810de7093 |
line wrap: on
line diff
--- a/dwt/program/Program.d Sun Jun 08 15:11:48 2008 +0200 +++ b/dwt/program/Program.d Sun Jun 15 22:32:20 2008 +0200 @@ -24,7 +24,6 @@ import dwt.dwthelper.utils; import tango.sys.SharedLib; -import tango.stdc.stringz; import tango.core.Exception; import tango.core.Array; import tango.text.convert.Format; @@ -705,9 +704,6 @@ * @param extension the program extension * @return the program or <code>null</code> * - * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT when extension is null</li> - * </ul> */ public static Program findProgram(String extension) { return findProgram(Display.getCurrent(), extension); @@ -718,7 +714,8 @@ * become public and the original method above can be deprecated. */ static Program findProgram(Display display, String extension) { - if (extension is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); + // DWT extension: allow null for zero length string + //if (extension is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); if (extension.length is 0) return null; if (extension.charAt(0) !is '.') extension = "." ~ extension; int desktop = getDesktop(display);