Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-build-dev] addListener


Hi folks,

i need help. I dont know why my add-button isnt work.


        ToolBar myTB=new ToolBar(parent,SWT.NONE);
        ToolItem myItemAdd=new ToolItem(myTB,SWT.NONE);
        ToolItem myItemRem=new ToolItem(myTB,SWT.NONE);
        myItemAdd.setText("Hinzufügen");
        myItemRem.setText("Entfernen");

        myItemAdd.addListener(SWT.DEFAULT,new Listener() {

            public void handleEvent(Event event) {
                try{
                System.out.println("Pressed 'Add'");

                FileDialog dd=new FileDialog(getShell());
                dd.setFilterExtensions(new String[]{"java"});
                dd.setText("Specify the Class to use in Template Builder");
                classesUsed.add(dd.open());
                }catch(Exception e)
                {
                    System.err.print("Error on ClassSelection :"+e.getStackTrace().toString());
                }

            }

        });

tnx.
---------------------------------------------
Peter Rader
Fachinformatiker Anwendungsentwicklung

NEW VOICE GmbH
An der großen Wisch 2
26133 Oldenburg

FON: +49 (0)441 8001-426
FAX: +49 (0)441 8001-111
WEB: www.new-voice.de
MAIL: p.rader@xxxxxxxxxxxx

Back to the top