Mercurial > projects > dwt-mac
comparison dwt/custom/TableTreeEditor.d @ 7:e831403a80a9
Add 'cast' to casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:30:35 +0200 |
parents | 1a8b3cb347e0 |
children | 6337764516f1 |
comparison
equal
deleted
inserted
replaced
6:b903c16b6f48 | 7:e831403a80a9 |
---|---|
56 * // Clean up any previous editor control | 56 * // Clean up any previous editor control |
57 * Control oldEditor = editor.getEditor(); | 57 * Control oldEditor = editor.getEditor(); |
58 * if (oldEditor !is null) oldEditor.dispose(); | 58 * if (oldEditor !is null) oldEditor.dispose(); |
59 * | 59 * |
60 * // Identify the selected row | 60 * // Identify the selected row |
61 * TableTreeItem item = (TableTreeItem)e.item; | 61 * TableTreeItem item = cast(TableTreeItem)e.item; |
62 * if (item is null) return; | 62 * if (item is null) return; |
63 * | 63 * |
64 * // The control that will be the editor must be a child of the Table | 64 * // The control that will be the editor must be a child of the Table |
65 * Text newEditor = new Text(table, DWT.NONE); | 65 * Text newEditor = new Text(table, DWT.NONE); |
66 * newEditor.setText(item.getText(EDITABLECOLUMN)); | 66 * newEditor.setText(item.getText(EDITABLECOLUMN)); |
67 * newEditor.addModifyListener(new ModifyListener() { | 67 * newEditor.addModifyListener(new ModifyListener() { |
68 * public void modifyText(ModifyEvent e) { | 68 * public void modifyText(ModifyEvent e) { |
69 * Text text = (Text)editor.getEditor(); | 69 * Text text = cast(Text)editor.getEditor(); |
70 * editor.getItem().setText(EDITABLECOLUMN, text.getText()); | 70 * editor.getItem().setText(EDITABLECOLUMN, text.getText()); |
71 * } | 71 * } |
72 * }); | 72 * }); |
73 * newEditor.selectAll(); | 73 * newEditor.selectAll(); |
74 * newEditor.setFocus(); | 74 * newEditor.setFocus(); |