www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - Does this look right?-Addressbook Example

reply Ty Tower <tytower yahoo.com.au> writes:
private void openAddressBook() {
    FileDialog fileDialog = new FileDialog(shell, DWT.OPEN);
    fileDialog.setFilterExtensions(["*.adr;", "*.*"]);
    fileDialog.setFilterNames([
        resAddressBook.getString("Book_filter_name") ~ " (*.adr)",
        resAddressBook.getString("All_filter_name") ~ " (*.*)"]);
    char[] name = fileDialog.open();
 

Looking at line 305 of AddressBook.d it has
"fileDialog.setFilterExtensions(["*.adr;", "*.*"]);"
with a semi-colon after adr. Is this a typo? I think the example only shows
.adr files and nothing else
May 20 2008
parent Ty Tower <tytower yahoo.com.au> writes:
Ty Tower Wrote:

 private void openAddressBook() {
     FileDialog fileDialog = new FileDialog(shell, DWT.OPEN);
     fileDialog.setFilterExtensions(["*.adr;", "*.*"]);
     fileDialog.setFilterNames([
         resAddressBook.getString("Book_filter_name") ~ " (*.adr)",
         resAddressBook.getString("All_filter_name") ~ " (*.*)"]);
     char[] name = fileDialog.open();
  
 
 Looking at line 305 of AddressBook.d it has
"fileDialog.setFilterExtensions(["*.adr;", "*.*"]);"
 with a semi-colon after adr. Is this a typo? I think the example only shows
.adr files and nothing else
Nope it works OK anyway
May 20 2008