Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8671043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:51:07+00:00 2026-06-12T18:51:07+00:00

Eclipse keeps telling me about invoke problems. This is the message i get as

  • 0

Eclipse keeps telling me about invoke problems. This is the message i get as can be seen below. Please help me resolve this problem. What code should i put to get rid of the invoke problem. thanks.

Warning!: method 'parsepack.xmlparsing.navigationClick(int,int)' not invoked.
Warning!: method 'parsepack.xmlparsing.insert(String,int)' not invoked.

here is the method navigationClick()

protected boolean navigationClick(int status, int time)
{
    try
    {
        //navigate here to another screen   
        ui.pushScreen(new ResultScreen()); 
    }
    catch(Exception e)
    {
       System.out.println("Exception:-  : navigationClick() "+e.toString());
    }
    return true;
}

here is the method insert()

public void insert(String toInsert, int index) 
{
    listElements.addElement(toInsert);
}

here is the class xmlparsing.java

package parsepack;

import java.io.IOException;
import java.io.InputStream;
import java.util.Vector;

import javax.microedition.io.Connector;
import javax.microedition.io.StreamConnection;

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.system.Display;
import net.rim.device.api.ui.DrawStyle;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.ListField;
import net.rim.device.api.ui.component.ListFieldCallback;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.container.VerticalFieldManager;
import net.rim.device.api.xml.parsers.DocumentBuilder;
import net.rim.device.api.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class xmlparsing extends UiApplication implements ListFieldCallback, FieldChangeListener
{

    public static void main(String[] args)
    {
        xmlparsing app = new xmlparsing();
        app.enterEventDispatcher();
    }


    public long mycolor ;
    Connection _connectionthread;
    private static ListField _list;
    private static Vector listElements = new Vector();
    public MainScreen screen = new MainScreen();
    VerticalFieldManager mainManager;
    VerticalFieldManager subManager;
    UiApplication ui = UiApplication.getUiApplication();


    public  xmlparsing()
    {
        super();
        pushScreen(screen);

        final Bitmap backgroundBitmap = Bitmap.getBitmapResource("blackbackground.png");

        mainManager = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL | Manager.NO_VERTICAL_SCROLLBAR )
        {

            public void paint(Graphics graphics)
            {
                graphics.drawBitmap(0, 0, Display.getWidth(),Display.getHeight(),backgroundBitmap, 0, 0);

                super.paint(graphics);
            }

        };

        subManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR )
        {
            protected void sublayout( int maxWidth, int maxHeight )
            {
                int displayWidth = Display.getWidth();
                int displayHeight = Display.getHeight();

                super.sublayout( displayWidth, displayHeight);
                setExtent( displayWidth, displayHeight);
            }
        };


        screen.add(mainManager);

        _list = new ListField()

        {

            public void paint(Graphics graphics)

            {
                graphics.setColor((int) mycolor);
                super.paint(graphics);

            }

        };
        mycolor = 0x00FFFFFF;
        _list.invalidate();
        _list.setEmptyString("* Feeds Not Available *", DrawStyle.HCENTER);
        _list.setRowHeight(50);
        _list.setCallback(this);
        mainManager.add(subManager);
        listElements.removeAllElements();
        _connectionthread = new Connection();
        _connectionthread.start();
    }


    protected boolean navigationClick(int status, int time)
    {
        try
        {
            //navigate here to another screen
            ui.pushScreen(new ResultScreen());                
        }
        catch(Exception e)
        {
            System.out.println("Exception:-  : navigationClick() "+e.toString());                
        }

        return true;
    }



    private class Connection extends Thread
    {
        public Connection()
        {
            super();
        }

        public void run() {
            Document doc;
            StreamConnection conn = null;
            InputStream is = null;
            try {

                conn = (StreamConnection) Connector.open("http://imforchange.org/international-movement-for-change/testing/data.xml"+";deviceside=true");

                DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                docBuilderFactory.setIgnoringElementContentWhitespace(true);
                docBuilderFactory.setCoalescing(true);
                DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                docBuilder.isValidating();
                is = conn.openInputStream();
                doc = docBuilder.parse(is);
                doc.getDocumentElement().normalize();
                NodeList list = doc.getElementsByTagName("eventName");
                for (int i = 0; i < list.getLength(); i++)
                {
                    Node textNode = list.item(i).getFirstChild();
                    listElements.addElement(textNode.getNodeValue());
                }

            } catch (Exception e) {
                System.out.println(e.toString());
            } finally {
                if (is != null) {
                    try { 
                        is.close();
                    } catch (IOException ignored) {
                    }
                }
                if (conn != null) {
                    try { 
                        conn.close(); 
                    }
                    catch (IOException ignored) {
                    }
                }    
            } 
            UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    _list.setSize(listElements.size());
                    subManager.add(_list);
                    screen.invalidate();
                }
            });
        }

    }


    public void drawListRow(ListField list, Graphics g, int index, int y, int w)
    {
        String tes = (String)listElements.elementAt(index);
        int yPos = 0+y;
        g.drawLine(0, yPos, w, yPos);
        g.drawText(tes, 5, 15+y, 0, w);
    }


    public Object get(ListField list, int index)
    {
        return listElements.elementAt(index);
    }
    public int indexOfList(ListField list, String prefix, int string)
    {
        return listElements.indexOf(prefix, string);
    }
    public int getPreferredWidth(ListField list)
    {
        return Display.getWidth();
    }
    public void insert(String toInsert, int index) {
        listElements.addElement(toInsert);
    }

    public void fieldChanged(Field field, int context) {


    }
}

ResultScreen.java

package parsepack;

import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.container.MainScreen;

public class ResultScreen extends MainScreen {

    public ResultScreen() {
        LabelField resultLabel = new LabelField("Result: ");  
        add(resultLabel);
    }  

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:51:08+00:00Added an answer on June 12, 2026 at 6:51 pm

    First of all, those messages you’re seeing are warnings, not errors. Warnings are not always a problem, but sometimes they are. In this case, I think that at least the first message is a problem, so you’ll want to fix it.

    1) First, the navigationClick() method. The compiler is telling you that you have an implementation for the method navigationClick() that is never called from any of your code, or by the BlackBerry OS infrastructure. That’s probably not what you want. Normally, navigationClick() is a method that you override in a class you write that extends one of the BlackBerry Field classes. For example, a ButtonField subclass. navigationClick() will be called, in that case, when the button is clicked.

    But, you placed your navigationClick() method in the main UIApplication subclass. That’s not what you want. You need that method to override the navigationClick() method in a field class. I’m not sure which field you want to have call this method when the user clicks. But, for example, you might do something like this:

    _list = new ListField()
    {
        public void paint(Graphics graphics)
        {
            graphics.setColor((int) mycolor);
            super.paint(graphics);
        }
        protected boolean navigationClick(int status, int time)
        {
            try
            {
                //navigate here to another screen
                ui.pushScreen(new ResultScreen());
            }
            catch(Exception e)
            {
                System.out.println("Exception:-  : navigationClick() "+e.toString());
            }
            return true;
        }
    }; 
    

    That would make navigationClick() get called when your list is clicked, and it will get rid of the warning.

    2) Regarding the warning about insert(), that’s just because you’re not using it anywhere. It look like you’ve added that method to allow code outside the xmlparsing class to be able to insert items into the list. Maybe that’s what you want, but you just haven’t yet written the other code to use that method. I see you having at least a few choices:

    1. remove or comment out the insert() method until you need it. this will get rid of the warning.
    2. add some more code that does use this method.
    3. ignore the warning, just making sure you understand that the warning is telling you that you have some code that is not (yet) necessary, since it’s unused
    4. you can suppress warnings in Java programs, by doing this, or this, in the Eclipse preferences, if you know the warning is not a problem, and you don’t want excessive warnings to hide real problems. I normally don’t recommend this. Usually, it’s better to fix the warning, than to hide it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Eclipse complains about my catch statement below public class NaturalLanguageMultiply { public class WrongMultiplierException
When I try to create a PlugIn Project in eclipse it keeps telling me,
I'm trying to install the google plugin for eclipse but the installer keeps telling
I am struggling with this! While trying to install some features - eclipse keeps
Eclipse keeps telling me there is a problem with http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd on my faces-config.xml, is
I'm trying to use the EPIC debugger in Eclipse and it keeps timing out.
I like formatting my Java code in Eclipse. It keeps the code well indented
Eclipse Helios periodically starts running a job which displays Computing additional info. During this
my app keeps force closing before it starts... eclipse returns no errors in my
My app keeps track of restaurant servers' shift sales to help them budget. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.