I just had to update my libs now nothing appears on the left slide out menu 
I have, how to fix??? My app calls addSideMenuToLeft(f); in the "before" 
method of the screen it uses the slide out menu on, was working perfectly 
for last few years until todays update. 

Method is quite simple here it is, what has gone wrong ??


Container SideMenuLEFT ;
    private void addSideMenuToLeft(Form f)
    {
        _("addSideMenuToLeft");        
        //make a toolbarForLeftMenu so we can use its sidemenu (we can only 
have one on the left!)
        if (toolbarForLeftMenu==null)
        {
            toolbarForLeftMenu = new Toolbar();
        }            
        toolbarForLeftMenu.setHidden(true);
        f.setToolbar(toolbarForLeftMenu);
                
        if (SideMenuLEFT==null) //otherwise it keeps adding each time
        {
            SideMenuLEFT = (Container)this.createContainer(resources, 
"SideMenuLEFT");
            
SideMenuLEFT.setWidth(Display.getInstance().getDisplayWidth()/2);
            
SideMenuLEFT.setHeight((Display.getInstance().getDisplayHeight()));
            
            SideMenuLEFT.setUIID("SideNavigationPanel");//so we get the 
nice background.
            toolbarForLeftMenu.setUIID("Container");
            toolbarForLeftMenu.addComponentToSideMenu(SideMenuLEFT);
            
            //make each button live, there are 2 buttons the icon and the 
words, for each one        
            Button btCategory = (Button) Tools.findByNameX("btCategory", 
SideMenuLEFT,sm );
            btCategory.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on category");
                    resetVars();
                    showFormX("Main",null);
                }
            });
            Button btCategoryB = (Button) Tools.findByNameX("btCategoryB", 
SideMenuLEFT,sm );
            btCategoryB.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on category");
                    resetVars();
                    showFormX("Main",null);
                }
            });
            Button btPopular = (Button) Tools.findByNameX("btPopular", 
SideMenuLEFT,sm );
            btPopular.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on btPopular");
                    resetVars();
                    userIsLookingAtPOPULAR=true;
                    questionWeWereLookingAt="";//we want to start at 0
                    downloadQuestions(GET_QUESTIONS_BY_POPULARITY,f,true);  
            
                }
            });
            Button btPopularB = (Button) Tools.findByNameX("btPopularB", 
SideMenuLEFT,sm );
            btPopularB.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on btPopularB");
                    resetVars();
                    userIsLookingAtPOPULAR=true;
                    questionWeWereLookingAt="";//we want to start at 0
                    downloadQuestions(GET_QUESTIONS_BY_POPULARITY,f,true);  
            
                }
            });
            Button btGroups = (Button) Tools.findByNameX("btGroups", 
SideMenuLEFT,sm );
            btGroups.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on btGroups");                
                    //toast.showOn(f, "Coming soon.", 1500);     
                     showFormX("GroupsForm",null);                    
                }
            });
            Button btGroupsB = (Button) Tools.findByNameX("btGroupsB", 
SideMenuLEFT,sm );
            btGroupsB.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on btGroupsB");
                    //toast.showOn(f, "Coming soon.", 1500);    
                     showFormX("GroupsForm",null);
                }
            });
            Button btMine = (Button) Tools.findByNameX("btMine", 
SideMenuLEFT,sm );
            btMine.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on mine");
                    resetVars();
                    userIsLookingAtMINE=true;
                    
                    //new, we go to a sub screen now that shows options:
                    //public, groups, friends.
                     showFormX("MineOptionsMenu",null);
                    //gets all the questions we made
                    //REMOVED FOR NOW WE NEED TO CALL THIS FROM THE 
SUBSCREEN  MineOptionsMenu
                    //downloadQuestions(GET_QUESTIONS_BY_ME,f,true);        
      
                }
            });
            Button btMineB = (Button) Tools.findByNameX("btMineB", 
SideMenuLEFT,sm );
            btMineB.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on mine");
                    resetVars();
                    userIsLookingAtMINE=true;
                    //new, we go to a sub screen now that shows options:
                    //public, groups, friends.
                     showFormX("MineOptionsMenu",null);
                    //gets all the questions we made
                    //REMOVED FOR NOW WE NEED TO CALL THIS FROM THE 
SUBSCREEN  MineOptionsMenu
                    //downloadQuestions(GET_QUESTIONS_BY_ME,f,true);        
      
                }
            });
            Button btFollowing = (Button) Tools.findByNameX("btFollowing", 
SideMenuLEFT,sm );
            btFollowing.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on btFollowing");                
                    resetVars();
                    userIsLookingAtFOLLOWING=true;
                    
downloadQuestions(GET_QUESTIONS_I_AM_FOLLOWING,f,true);          
                }
            });
            Button btFollowingB = (Button) 
Tools.findByNameX("btFollowingB", SideMenuLEFT,sm );
            btFollowingB.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on btFollowingB");
                    resetVars();
                    userIsLookingAtFOLLOWING=true;
                    
downloadQuestions(GET_QUESTIONS_I_AM_FOLLOWING,f,true);          
                }
            });            
            Button btMessages = (Button) Tools.findByNameX("btMessages", 
SideMenuLEFT,sm );
            btMessages.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on btMessages  
GET_QUESTIONS_IM_INVITED_TO");
                    
                    //what this does is scan every question and see if 
there are any for us, 
                    //this could be kind of time consuming. see elsewhere 
in this file for more discussion on this
                    resetVars();
                    url = Prefs.base+"entities.question/";
                    String payload = "";
                    boolean shownetworkScreen=true;
                    
doNetworking(url,payload,GET_QUESTIONS_IM_INVITED_TO,shownetworkScreen,"QuestionScreen",f);
  
       
                    }
                });
            Button btMessagesB = (Button) Tools.findByNameX("btMessagesB", 
SideMenuLEFT,sm );
            btMessagesB.addActionListener(new ActionListener(){
                @Override
                public void actionPerformed(ActionEvent evt) {
                    _("left menu press on btMessagesB  
GET_QUESTIONS_IM_INVITED_TO ");
                    //what this does is scan every question and see if 
there are any for us, 
                    //this could be kind of time consuming. see elsewhere 
in this file for more discussion on this
                    resetVars();
                    url = Prefs.base+"entities.question/";
                    String payload = "";
                    boolean shownetworkScreen=true;
                    state=GET_QUESTIONS_IM_INVITED_TO;//explicitly since we 
dont call download questions in same way
                    
doNetworking(url,payload,GET_QUESTIONS_IM_INVITED_TO,shownetworkScreen,"QuestionScreen",f);
  
       
                }
            });
        }             
}

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/04a227a2-5ae3-4e2c-8612-c5ca66a45165%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to