Mercurial > projects > dwt-linux
comparison dwt/widgets/MenuItem.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | de2578a843a7 |
children | ce446666f5a2 |
comparison
equal
deleted
inserted
replaced
237:98b80b00af79 | 238:380bad9f6852 |
---|---|
831 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 831 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
832 * </ul> | 832 * </ul> |
833 * | 833 * |
834 * @see #setAccelerator | 834 * @see #setAccelerator |
835 */ | 835 */ |
836 public override void setText (char[] string) { | 836 public override void setText (String string) { |
837 checkWidget(); | 837 checkWidget(); |
838 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); | 838 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); |
839 if ((style & DWT.SEPARATOR) !is 0) return; | 839 if ((style & DWT.SEPARATOR) !is 0) return; |
840 if (text.equals(string)) return; | 840 if (text.equals(string)) return; |
841 super.setText (string); | 841 super.setText (string); |
842 char[] accelString = ""; | 842 String accelString = ""; |
843 int index = string.indexOf ('\t'); | 843 int index = string.indexOf ('\t'); |
844 if (index !is -1) { | 844 if (index !is -1) { |
845 accelString = string.substring (index, string.length); | 845 accelString = string.substring (index, string.length); |
846 string = string.substring (0, index); | 846 string = string.substring (0, index); |
847 } | 847 } |