www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - jface.dialogs.PopupDialog : Cyclic dependency in module

reply yidabu <yidabu.spam gmail.com> writes:
code bellow cause run time Exception:
object.Exception: Cyclic dependency in module
dwtx.jface.dialogs.IDialogConstants

tested with dwt-win svn, dwtx svn, dmd 1.028

Code:

import dwt.DWT;
import dwt.layout.FillLayout;
import dwt.widgets.Display;
import dwt.widgets.Shell;
import dwt.widgets.Listener;
import dwt.widgets.Event;
import dwt.widgets.Button;

import dwtx.jface.dialogs.PopupDialog;
import dwt.dwthelper.utils;


void handleSelection(Event e, Shell shell)
{
    auto dialog = new PopupDialog(shell, DWT.NONE, true,
false,true,false,true,"test title", "test info");
    dialog.open();
}

void main() {
    final Display display = new Display();
    final Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());
    Button button = new Button(shell, DWT.PUSH);
    button.setText("&OK");
    button.addListener(DWT.Selection, dgListener(&handleSelection, shell));
    shell.pack();
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) display.sleep();
    }
    display.dispose();
}




-- 
yidabu <yidabu.spam gmail.com>
http://www.dsource.org/projects/dwin

D -(D Chinese):
http://www.d-programming-language-china.org/
http://bbs.d-programming-language-china.org/
http://dwin.d-programming-language-china.org/
http://scite4d.d-programming-language-china.org/
Jun 20 2008
parent Frank Benoit <keinfarbton googlemail.com> writes:
yidabu schrieb:
 code bellow cause run time Exception:
 object.Exception: Cyclic dependency in module
dwtx.jface.dialogs.IDialogConstants
 
 tested with dwt-win svn, dwtx svn, dmd 1.028
 
 Code:
 
 import dwt.DWT;
 import dwt.layout.FillLayout;
 import dwt.widgets.Display;
 import dwt.widgets.Shell;
 import dwt.widgets.Listener;
 import dwt.widgets.Event;
 import dwt.widgets.Button;
 
 import dwtx.jface.dialogs.PopupDialog;
 import dwt.dwthelper.utils;
 
 
 void handleSelection(Event e, Shell shell)
 {
     auto dialog = new PopupDialog(shell, DWT.NONE, true,
false,true,false,true,"test title", "test info");
     dialog.open();
 }
 
 void main() {
     final Display display = new Display();
     final Shell shell = new Shell(display);
     shell.setLayout(new FillLayout());
     Button button = new Button(shell, DWT.PUSH);
     button.setText("&OK");
     button.addListener(DWT.Selection, dgListener(&handleSelection, shell));
     shell.pack();
     shell.open();
     while (!shell.isDisposed()) {
         if (!display.readAndDispatch()) display.sleep();
     }
     display.dispose();
 }
 
 
 
 

Thanks for the report. Is fixed now.
Jun 20 2008