Mercurial > projects > dwt-linux
diff dwt/custom/PopupList.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | 0f12f6bb9739 |
children | 5a30aa9820f3 |
line wrap: on
line diff
--- a/dwt/custom/PopupList.d Sat Apr 26 10:01:30 2008 +0200 +++ b/dwt/custom/PopupList.d Mon May 05 00:42:55 2008 +0200 @@ -12,6 +12,8 @@ *******************************************************************************/ module dwt.custom.PopupList; +import dwt.dwthelper.utils; + import dwt.DWT; import dwt.DWTException; @@ -127,7 +129,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public char[][] getItems () { +public String[] getItems () { return list.getItems(); } /** @@ -146,7 +148,7 @@ * * @return the text of the selected item or null if no item is selected */ -public char[] open (Rectangle rect) { +public String open (Rectangle rect) { Point listSize = list.computeSize (rect.width, DWT.DEFAULT, false); Rectangle screenSize = shell.getDisplay().getBounds(); @@ -194,16 +196,16 @@ if (!display.readAndDispatch()) display.sleep(); } - char[] result = null; + String result = null; if (!shell.isDisposed ()) { - char[] [] strings = list.getSelection (); + String [] strings = list.getSelection (); shell.dispose(); if (strings.length !is 0) result = strings [0]; } return result; } /** -* Selects an item with text that starts with specified char[]. +* Selects an item with text that starts with specified String. * <p> * If the item is not currently selected, it is selected. * If the item at an index is selected, it remains selected. @@ -216,8 +218,8 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void select(char[] string) { - char[][] items = list.getItems(); +public void select(String string) { + String[] items = list.getItems(); // find the first entry in the list that starts with the // specified string @@ -269,7 +271,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setItems (char[][] strings) { +public void setItems (String[] strings) { list.setItems(strings); } /**