Mercurial > projects > dwt-linux
diff dwt/widgets/CoolBar.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/widgets/CoolBar.d Sun Jun 08 15:11:48 2008 +0200 +++ b/dwt/widgets/CoolBar.d Sun Jun 15 22:32:20 2008 +0200 @@ -12,8 +12,6 @@ *******************************************************************************/ module dwt.widgets.CoolBar; - - import dwt.DWT; import dwt.DWTException; import dwt.graphics.Color; @@ -26,6 +24,7 @@ import dwt.widgets.Event; import dwt.widgets.Control; import dwt.widgets.Listener; + import dwt.dwthelper.utils; /** @@ -950,7 +949,8 @@ return indices; } void setItemOrder (int[] itemOrder) { - if (itemOrder is null) error(DWT.ERROR_NULL_ARGUMENT); + // DWT extension: allow null for zero length string + //if (itemOrder is null) error(DWT.ERROR_NULL_ARGUMENT); int count = originalItems.length; if (itemOrder.length !is count) error(DWT.ERROR_INVALID_ARGUMENT); @@ -992,7 +992,8 @@ return sizes; } void setItemSizes (Point[] sizes) { - if (sizes is null) error(DWT.ERROR_NULL_ARGUMENT); + // DWT extension: allow null for zero length string + //if (sizes is null) error(DWT.ERROR_NULL_ARGUMENT); CoolItem[] items = getItems(); if (sizes.length !is items.length) error(DWT.ERROR_INVALID_ARGUMENT); for (int i = 0; i < items.length; i++) { @@ -1143,7 +1144,6 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if item order or sizes is null</li> * <li>ERROR_INVALID_ARGUMENT - if item order or sizes is not the same length as the number of items</li> * </ul> */