Changeset 240:c84e3d3feb3f
- Timestamp:
- 06/20/08 20:24:49
(3 months ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
allow null strings and arrays as arguments
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r213 |
r240 |
|
| 1033 | 1033 | * @param string the new text |
|---|
| 1034 | 1034 | * |
|---|
| 1035 | | * @exception IllegalArgumentException <ul> |
|---|
| 1036 | | * <li>ERROR_NULL_ARGUMENT - if the text is null</li> |
|---|
| 1037 | | * </ul> |
|---|
| 1038 | 1035 | * @exception DWTException <ul> |
|---|
| 1039 | 1036 | * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 1045 | 1042 | override public void setText (String string) { |
|---|
| 1046 | 1043 | checkWidget (); |
|---|
| 1047 | | if (string is null) error (DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 1044 | // DWT extension: allow null string |
|---|
| | 1045 | //if (string is null) error (DWT.ERROR_NULL_ARGUMENT); |
|---|
| 1048 | 1046 | if ((style & DWT.SEPARATOR) !is 0) return; |
|---|
| 1049 | 1047 | if (text==/*eq*/string ) return; |
|---|
| r213 |
r240 |
|
| 669 | 669 | * @param items the array of items |
|---|
| 670 | 670 | * |
|---|
| 671 | | * @exception IllegalArgumentException <ul> |
|---|
| 672 | | * <li>ERROR_NULL_ARGUMENT - if the items array is null</li> |
|---|
| 673 | | * </ul> |
|---|
| 674 | 671 | * @exception DWTException <ul> |
|---|
| 675 | 672 | * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 679 | 676 | public void setSelection (TabItem [] items) { |
|---|
| 680 | 677 | checkWidget (); |
|---|
| 681 | | if (items is null) error (DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 678 | // DWT extension: allow null array |
|---|
| | 679 | //if (items is null) error (DWT.ERROR_NULL_ARGUMENT); |
|---|
| 682 | 680 | if (items.length is 0) { |
|---|
| 683 | 681 | setSelection (-1, false); |
|---|
| r213 |
r240 |
|
| 326 | 326 | * @param string the new text |
|---|
| 327 | 327 | * |
|---|
| 328 | | * @exception IllegalArgumentException <ul> |
|---|
| 329 | | * <li>ERROR_NULL_ARGUMENT - if the text is null</li> |
|---|
| 330 | | * </ul> |
|---|
| 331 | 328 | * @exception DWTException <ul> |
|---|
| 332 | 329 | * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 337 | 334 | override public void setText (String string) { |
|---|
| 338 | 335 | checkWidget(); |
|---|
| 339 | | if (string is null) error (DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 336 | // DWT extension: allow null string |
|---|
| | 337 | //if (string is null) error (DWT.ERROR_NULL_ARGUMENT); |
|---|
| 340 | 338 | if (string ==/*eq*/text ) return; |
|---|
| 341 | 339 | int index = parent.indexOf (this); |
|---|