1. #1
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default MenuEvent question

    MenuEvent question


    what am i doing wrong?

    Menu menu = new Menu();
    menu.add(new MenuItem("Save Order","icon-menu-save"));
    menu.add(new MenuItem("Copy Order","icon-menu-copy"));
    menu.add(new SeparatorMenuItem());
    menu.add(new MenuItem("Print Detailed Quotation","icon-menu-print"));
    menu.add(new MenuItem("Print Generic Approval","icon-menu-print"));
    menu.add(new MenuItem("Print Production Approval","icon-menu-print"));
    menu.add(new MenuItem("Print Approval","icon-menu-print"));
    menu.add(new MenuItem("Print Artwork Request","icon-menu-print"));
    menu.add(new MenuItem("Print Digitizing WorkOrder","icon-menu-print"));
    menu.add(new MenuItem("Print Sample Order","icon-menu-print"));
    menu.add(new MenuItem("Print Order","icon-menu-print"));
    menu.add(new SeparatorMenuItem());
    menu.add(new MenuItem("Close","icon-menu-close"));
    item1.setMenu(menu);

    Listener menulistener = new Listener<MenuEvent>() {

    public void handleEvent(MenuEvent be) {
    Info.display("Test","{0}",((MenuItem)be.component).getText());
    }
    };

    menu.addListener(Events.OnClick, menulistener);



    I am trying to figure out what menu item i am selecting.

  2. #2
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    never mind i figure it out

    SelectionListener menulistener = new SelectionListener<MenuEvent>() {

    public void componentSelected(MenuEvent ce) {
    Info.display("test","{0}",((MenuItem)ce.item).getText());
    }
    };

    Menu menu = new Menu();
    menu.add(new MenuItem("Save Order","icon-menu-save",menulistener));
    menu.add(new MenuItem("Copy Order","icon-menu-copy",menulistener));
    menu.add(new SeparatorMenuItem());
    menu.add(new MenuItem("Print Detailed Quotation","icon-menu-print",menulistener));
    menu.add(new MenuItem("Print Generic Approval","icon-menu-print",menulistener));
    menu.add(new MenuItem("Print Production Approval","icon-menu-print",menulistener));
    menu.add(new MenuItem("Print Approval","icon-menu-print",menulistener));
    menu.add(new MenuItem("Print Artwork Request","icon-menu-print",menulistener));
    menu.add(new MenuItem("Print Digitizing WorkOrder","icon-menu-print",menulistener));
    menu.add(new MenuItem("Print Sample Order","icon-menu-print",menulistener));
    menu.add(new MenuItem("Print Order","icon-menu-print",menulistener));
    menu.add(new SeparatorMenuItem());
    menu.add(new MenuItem("Close","icon-menu-close",menulistener));
    item1.setMenu(menu);


    seems like each menuitem got to have the listener

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi