# HG changeset patch # User Frank Benoit # Date 1210602566 -7200 # Node ID 9c2803aea1213f3671c86ebec8841d0dcc33d643 # Parent 931cabfa238f31c6983511925bd9d8c9cf2ea107 Fix Addressbook example and HG ignores diff -r 931cabfa238f -r 9c2803aea121 .hgignore --- a/.hgignore Sun May 11 21:38:15 2008 +0200 +++ b/.hgignore Mon May 12 16:29:26 2008 +0200 @@ -18,21 +18,22 @@ ^jface/dsss.last ^jface/dsss_imports -^dwtexamples/dsss_objs -^dwtexamples/dsss.last -^dwtexamples/dsss_imports +^examples/dsss_objs +^examples/dsss.last +^examples/dsss_imports -^dwtsnippets/dsss_objs -^dwtsnippets/dsss.last -^dwtsnippets/dsss_imports +^snippets/dsss_objs +^snippets/dsss.last +^snippets/dsss_imports -^dwtexamples/simple$ -^dwtexamples/helloworld/HelloWorld[0-9]$ -^dwtexamples/addressbook/AddressBook$ -^dwtexamples/controlexample/ControlExample$ -^dwtexamples/controlexample/CustomControlExample$ -^dwtexamples/texteditor/TextEditor$ -^dwtsnippets/.*/Snippet[0-9]*$ +^examples/simple$ +^examples/helloworld/HelloWorld[0-9]$ +^examples/addressbook/AddressBook$ +^examples/clipboard/ClipboardExample$ +^examples/controlexample/ControlExample$ +^examples/controlexample/CustomControlExample$ +^examples/texteditor/TextEditor$ +^snippets/.*/Snippet[0-9]*$ ^user/torhu_synctest$ ^user/drawingboard/DrawingBoard$ ^user/dragdrop/texttolabel$ diff -r 931cabfa238f -r 9c2803aea121 examples/addressbook/AddressBook.d --- a/examples/addressbook/AddressBook.d Sun May 11 21:38:15 2008 +0200 +++ b/examples/addressbook/AddressBook.d Mon May 12 16:29:26 2008 +0200 @@ -45,6 +45,9 @@ import examples.addressbook.DataEntryDialog; import examples.addressbook.FindListener; +version(JIVE){ + import jive.stacktrace; +} void main() { Display display = new Display(); auto application = new AddressBook(); @@ -108,7 +111,7 @@ createMenuBar(); - searchDialog = new SearchDialog(shell); + searchDialog = new SearchDialog(shell, resAddressBook ); searchDialog.setSearchAreaNames(columnNames); searchDialog.setSearchAreaLabel(resAddressBook.getString("Column")); searchDialog.addFindListener(new class() FindListener { @@ -204,7 +207,7 @@ box.open(); } private void editEntry(TableItem item) { - DataEntryDialog dialog = new DataEntryDialog(shell); + DataEntryDialog dialog = new DataEntryDialog(shell, resAddressBook ); dialog.setLabels(columnNames); char[][] values = new char[][table.getColumnCount()]; for (int i = 0; i < values.length; i++) { @@ -283,7 +286,7 @@ isModified = false; } private void newEntry() { - DataEntryDialog dialog = new DataEntryDialog(shell); + DataEntryDialog dialog = new DataEntryDialog(shell, resAddressBook); dialog.setLabels(columnNames); char[][] data = dialog.open(); if (data !is null) { diff -r 931cabfa238f -r 9c2803aea121 examples/addressbook/DataEntryDialog.d --- a/examples/addressbook/DataEntryDialog.d Sun May 11 21:38:15 2008 +0200 +++ b/examples/addressbook/DataEntryDialog.d Mon May 12 16:29:26 2008 +0200 @@ -41,9 +41,9 @@ char[][] values; char[][] labels; -public this(Shell parent) { +public this(Shell parent, ResourceBundle bdl ) { if( resAddressBook is null ){ - resAddressBook = ResourceBundle.getBundle("examples_addressbook"); + resAddressBook = bdl;//ResourceBundle.getBundle("examples_addressbook"); } shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.PRIMARY_MODAL); shell.setLayout(new GridLayout()); diff -r 931cabfa238f -r 9c2803aea121 examples/addressbook/SearchDialog.d --- a/examples/addressbook/SearchDialog.d Sun May 11 21:38:15 2008 +0200 +++ b/examples/addressbook/SearchDialog.d Mon May 12 16:29:26 2008 +0200 @@ -59,9 +59,9 @@ * @param parent Shell * The shell that is the parent of the dialog. */ -public this(Shell parent) { +public this(Shell parent, ResourceBundle bdl ) { if( resAddressBook is null ){ - resAddressBook = ResourceBundle.getBundle("examples_addressbook"); + resAddressBook = bdl;//ResourceBundle.getBundle("examples_addressbook"); } shell = new Shell(parent, DWT.CLOSE | DWT.BORDER | DWT.TITLE); GridLayout layout = new GridLayout();