# HG changeset patch # User Frank Benoit # Date 1202322804 -3600 # Node ID a155324d7a446ef2414d84b7b6e88c326d41ee7f # Parent 00a333240696408058323af779f755f6ccdddc09 make table text visible diff -r 00a333240696 -r a155324d7a44 dwt/widgets/Table.d --- a/dwt/widgets/Table.d Wed Feb 06 18:46:23 2008 +0100 +++ b/dwt/widgets/Table.d Wed Feb 06 19:33:24 2008 +0100 @@ -5976,7 +5976,7 @@ string.getChars (0, length_, buffer, 0); buffer [length_++] = 0; static if (OS.IsUnicode) { - OS.MoveMemory (plvfi.item.pszText, buffer.ptr, length_ * 2); + OS.MoveMemory (plvfi.item.pszText, StrToTCHARz( buffer[0..length_] ), length_ * 2); } else { OS.WideCharToMultiByte (getCodePage (), 0, buffer.ptr, length_, plvfi.item.pszText, plvfi.item.cchTextMax, null, null); byte dummy; diff -r 00a333240696 -r a155324d7a44 dwt/widgets/TableItem.d --- a/dwt/widgets/TableItem.d Wed Feb 06 18:46:23 2008 +0100 +++ b/dwt/widgets/TableItem.d Wed Feb 06 19:33:24 2008 +0100 @@ -1194,17 +1194,17 @@ if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if (index is 0) { if (string ==/*eq*/text) return; - super.setText (string); + super.setText (string.dup); } int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return; if (strings is null && index !is 0) { - strings = new char[] [count]; + strings = new char[][] (count); strings [0] = text; } if (strings !is null) { if (string==/*eq*/strings [index]) return; - strings [index] = string; + strings [index] = string.dup; } if ((parent.style & DWT.VIRTUAL) !is 0) cached = true; if (index is 0) {