Repeated cannot find symbol errors

Hi, I'm a newb at blackberry JDE and java in general. I'm used to working to loosen typed and extended as php environments. I'm creating a simple application tasking to teach myself State and management of the data and other. I've made very little progress and I am already stuck. I looked through the blackberry API tutorial resources and searching the forums, but have been unable to find answers (probably seen them and just he did not know that I am so lost). I met two roadblocks in the following code, which intervened in the section highlighted with #. The following class is called by a class of application and built and tested successfully, without the sharps.

1.) whenever I try to add whatever it is inside the class ButtonListener (by adding the code in force, that is), as a string, call a method or try to push something to the front of the battery of the display, I get the error 'cannot find symbol' during compilation. I guess it's a problem with the legacy of some sort, but I am totally lost and frustrated.

2.) once it's resolved, I want to insert a switch statement where the # is to add and remove items from different field of the display depending on the value selected in the ObjectChoiceField itemTypeField. I think, I need to set the index of the choicefield initially and then retrieve it later, but I don't know how.

Any help will be greatly appreciated.

import net.rim.device.api.ui.*;import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.ui.Manager.*;import net.rim.device.api.ui.UiApplication;

/** *  */public class NewItemScreen extends MainScreen{    //Set Form Variables        private LabelField applicationTitle = new LabelField("New Item");        private EditField itemTitleField = new EditField("Title: ", "");        private String typechoices[] = {"Project", "Task", "Event"};        private ObjectChoiceField itemTypeField = new ObjectChoiceField("Type: ", typechoices, 0);

    public NewItemScreen()    {        super();        //Add to Screen        setTitle(applicationTitle);        add(itemTitleField);        add(itemTypeField);        //Set Listeners        itemTypeField.setChangeListener(new ButtonListener());       }

    //Implement Button Listener    private class ButtonListener implements FieldChangeListener    {        public void fieldChanged(Field field, int context)        {            if(context != FieldChangeListener.PROGRAMMATIC) // Perform action if user changed field.            {                if(field == itemTypeField)                {                    ####################                }            }        }    }}

(1) can't find symbol error occurs when you create an instance of a class not created no where... Or the class path may not be configured correctly. Compiler isn't aware of the path where the classes... Also when we forget to import the required classes as well...

if(context != FieldChangeListener.PROGRAMMATIC) // Perform action if user changed field.               {                    if(field == itemTypeField)                   {                            ####################                 }            }

The first if the cheque is not necessary however... Also, I would say not to use the double equals "is" use as field.equals (itemTypeField)...

(2) I did not understand, what exactly you need to...

Thank you!

Tags: BlackBerry Developers

Similar Questions

  • error: "cannot find symbol" when you use String.getBytes (java.nio.charset.Charset)

    I have a very simple java class that uses String.getBytes (java.nio.charset.Charset). When I use loadjava, I get the error: "cannot find symbol" for this call. Any ideas on what could be the problem?

    Here is the full source:

    package mytest;

    java.lang.String import;
    java.nio.charset import. *;

    public class MyTest {
    public final static Charset utf8charset = Charset.forName("UTF-8");

    public int printString (String s)
    {
    Byte [] utf8 = s.getBytes (utf8charset);
    System.out.println (utf8);
    }

    public void printString)
    {
    printString ("hello");
    }

    };

    Thanks in advance,

    Keith

    Your code is correct for java 1.6 and higher...

    First of all, you should check that java version is on your database...

    FUNCTION to CREATE or REPLACE getJavaProperty (myprop IN VARCHAR2)

    RETURN VARCHAR2 IS THE JAVA LANGUAGE

    name "java.lang.String return java.lang.System.getProperty (java.lang.String);

    SELECT getJavaProperty ('java.version') of double;

    in my case, I have java 1.5...

    If you look at the Javadoc String (Java Platform SE 7) you will notice that your version is located for java greater or equal to version 1.6

    Try with:

    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED INSURANCE2."Test1" as
    public class MyTest
    {
    public static int printString(String s)
    {
            try
            {
            byte[] utf8 = s.getBytes("UTF-8");
            System.out.println (new String(utf8));
            }
            catch(Exception ex)
            {
              return -1;
            }
            return 1;
    }
    
    };
    
  • I started to get a red message box when trying to get updates... "windows cannot find updates" error 80070490

    I started receivine a red message box when trying to get updates... "windows cannot find updates" error 80070490.  I tried this fix only displayed in this field of the error help and have downloaded the fix - it Center, and he is unable to perform the task.  Please let know us what I can do.  Thank you

    Hello

    Please see the following Microsoft KB article:

    You receive an error code "0 x 80070490" when you use Microsoft Update or Windows Update Web sites to install updates:

    http://support.Microsoft.com/kb/958044

    Warning: Before you perform an upgrade in-place, you must be prepared for the worst scenarios that led to your existing data on your computer being deleted. These data include data personal, settings, information about the hardware and software drivers. In case of a worst case scenario, you may have to reinstall all the programs. Make sure that you back up personal data to disks or other external storage devices before performing an upgrade on the spot.

    I hope this helps.

  • Windows cannot find not (Error Message)

    Windows cannot find not (Error Message)

     Links in Windows Mail = "File not found"... "in IE9

    I use Windows Vista Home Premium; Windows Mail; IE9. -Links browser does not work in Windows Mail - IE9 opens and is left blank with an Error Message in a small window saying:

    Title: http://click.scrippsnetworks.com/track?type...
    Body says: "Windows cannot find
    ... subscription/8080/subscribeUpdate? brand... »
    "Make sure you typed the name correctly and then try again."

    (details vary with each different link)

     
    If I have IE9 open before clicking on the link Windows Mail, everything works as it should.  This problem occurs only if IE9 is not displayed when the user clicks on the link Windows Mail.

    It worked before using clear CCcleaner on cookies and other temporary files, etc.  I think I must have messed up something in the registry.

    Hello

    Method 1: I recommend you perform the clean boot.

    See the following article in the Microsoft KB for more information on how to solve a problem by performing a clean boot in Windows Vista or Windows 7:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: After a repair, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

    Method 2: Try a system restore:

    Restoration of the system of windows vista DVD:

    Put the computer to an earlier point in time when the computer was working fine.

    1. Insert the installation disc.

    2. restart your computer.

    Click the Start button, click the arrow next to the button lock and then click on restart.

    3. If you are prompted, press any key to start Windows from the installation disc.

    4. choose your language settings, and then click Next.

    5. click on repair your computer.

    6. Select the operating system you want to repair, and then click Next.

    7. in the System Recovery Options menu, click System Restore and follow the instructions.

    I hope this helps!

  • How can I fix the cannot find server error when you use Bing?

    When I want to use Bing as a search engine, I always get an error message cannot find server. When the connection problem is diagnosed, the result is that there is not a problem with the connection. I get the same thing when I use the Google search engine. OT most of the time I'm successful search with Ask. I use Windows XP.

    Hi MineMN,

    ·         Did you do changes on the computer before the show?

    ·         What web browser do you use?

    If you are using Internet Explorer, follow these methods.

    Method 1: Follow the steps in the article.

    "Internet Explorer cannot display the webpage" error in Internet Explorer

    Method 2: If you still face the same problem reset the TCP/IP stack.

    How to reset the Protocol Internet (TCP/IP)

    Method 3: Reset the proxy server. Follow these steps:

    (a) click Start, run, type cmd , and then press enter.

    (b) type the following commands at the command prompt and press enter after each command:

    proxycfg d

    proxycfg-u

  • Get a "Cannot find driver" error when connecting to my HP Laserjet 4350 PCL5 for workgroup computer.

    * Original title: problem with HP Laserjet 4350 PCL5

    I have a shared network printer. But when connect us to another computer in the workgroup. It says that it cannot find the driver. Computer has Windows 7 64 bit. I tried my drivers and .inf files, but nothing works.

    Hello

    This problem may occur if the printer drivers are not installed properly.

    I suggest you run the HP print and Scan from following link doctor and see if that fixes the problem.

    http://h10025.www1.HP.com/ewfrf/wc/document?cc=us&LC=en&docName=c02073861&JumpID=ex_r4155/HHO/IPG/ccdoc/trailhead_doc

    You can try to install the last printing software, drivers from the following link and check if it helps.

    http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdHome/?sp4ts.oid=412171&spf_p.tpst=swdMain&spf_p.prp_swdMain=wsrp-navigationalState%3DswEnvOID%253D4063%257CswLang%253D%257Caction%253DlistDriver&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

    For more information, see the links.

    Problem for HP LaserJet 4350 printers

    Share a printer

    Install a printer on a home network

    Keep us informed on the status of the issue.

  • How to open my file after ' cannot find - filename-"error message?

    OK, the bottom line is, InDesign crashes and I can't recover my file. I get a "File not found" error message when I try to open the file.

    I use CS6 on a MacBookAir, OS X Yosemite.

    I tried to find the "InDesignFileRecovery" folder, I can not find anywhere, is not in my file library or Caches.

    However, I work in dropbox, so I headed over to dropbox to recover from their "previous versions". It starts to get weird. There are a lot of versions (I back up very regularly), but when I download a previous version (I know was fine) it downloads with the extension indd.txt. So I remove the txt extension and keep the indd and everything seems fine, but then that recovered file gives the same message. I tried renaming the file opening and recovered that same "file not found" error message.

    I can open InDesign and open the file from the previous day, but nothing of the box of older versions of work this day of. I'm SO sick of what's going on. It happened to me last week, so far I lost 20 hours work :-(

    I tried quit InDesign and restart the Mac, does not help. The only thing I can think of is to "save under" every two hours, at least, if all goes well then I lose only 2 hours of work.

    I found the answer on another thread. The solution is to open in InDesign and when you select the file to open, choose "open copy". It worked! Cannot believe it. Still don't know why dropbox tactics did not work well...

  • Windows updates: error 80072EFE Code. Cannot find the error code.

    Anyone has any info on the error 80072EFE code.  I can't get windows updates...

    Successes have been reported using TDSSKiller.exe which will remove the malware, which belongs to the 'family' of Rootkit.Win32.TDSS, of your machine.
    Here is the link:
    http://support.Kaspersky.com/viruses/solutions?QID=208280684

    My previous answer to the same question:
    http://social.answers.Microsoft.com/forums/en-us/vistaperformance/thread/5fa45657-9cf1-45E4-BEAB-6a97e7644c55

    Here are a few other previous answers from other users:
    http://social.technet.Microsoft.com/forums/en/itprovistaie/thread/0ce7c1e6-7EF2-48e1-B7C9-c8f1e97c71d5

    Here is a tutorial from Microsoft Support
    http://support.Microsoft.com/kb/836941 . for the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • Bluetooth cannot find logical error code turn 10

    Acer aspire 6920 with bluetooth.    try to only synchronize sound logic itower, acer vcm no external audio device and the bluetooth connection Center disabled

    Hello

    Method 1:

    Check the link and see if it helps:

    Description of errors related to the 10 Code that generates the Device Manager in Windows on computers

    http://support.Microsoft.com/kb/943104

    Method 2:

    Check the link and try to run the Microsoft Fix it:

    Hardware devices do not work or are not detected in Windows

    http://support.Microsoft.com/mats/hardware_device_problems/en-us

    Method 3:

    I would say as update you the drivers for the device and check if the problem persists:

    Updated a hardware driver that is not working properly

    http://Windows.Microsoft.com/en-us/Windows-Vista/update-a-driver-for-hardware-that-isn ' t-work correctly

    Let us know if it helps.

  • Cannot find the error

    HI, I'm doing a project in my school. My teacher asked me to get the MS access database, and then put it in labview... I try making it one, but I don't know where are my mistakes...

    Please tell where I was wrong... Moreover, I quite new to labview with database connectivity kit.

    Thanks in advance .

    What do you use for the name of the path and of the table? The path must be a dsn or udl. This is explained in the help of the function of connection open.

  • Cannot find the error message printer

    When you try to print via bluetooth Mac OSX 10.8.5 on my Photosmart Premium all in one 309 has to get the message "print - printer.  Why?  How to solve?

    Hi hay3911,

    Thanks for letting me know that the problem is solved. {Happy Dance }

    Remember to mark the Message 5 post that solved the problem like "Accept as Solution" so that someone else in the community of HP who can meet the same or similar problem will know what to do.

    Thank you.

  • JDE error: cannot find the symbol: the class Calculator

    I am trying to transfer the code that I wrote in a test over a clean workspace application and I'm missing class errors.

    I created a new workspace (abacus) and a new project (abacus) with the path com\sample\abacus and Calculator.java copied to the new folder.  In my project, I have added Calculator.java and it appears in my list of files.

    When I build I get

    D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin\CAbacus\com\sample\abacus\Abacus.java:22: cannot find symbol
    symbol  : class Calculator
    location: class com.monkeymade.cabacus.CAbacus
        Calculator calc = new Calculator();
        ^
    

    with the code

    class Abacus extends MainScreen{
    
        // create a new calculator
        Calculator calc = new Calculator();
    

    It's been long enough that I worked in Java and clearly, I missed a step somewhere.  Could someone straiten me?

    Seems I forgot to update the declartion of pacake in Calculator.java

    package com.sample.abacus;
    
  • cannot find the symbol: class TouchEvent

    Hello.

    I want my application to respont to some touchgestures (SWIPE_EAST and SWIPE_WEST for now...)

    I found a great example on how this right here: http://na.blackberry.com/eng/deliverables/5820/Respond_to_a_slide_down_motion_508152_11.jsp

    The problem is, that the need to import classes do not work for me...

    // Gesture handling
    import net.rim.device.api.ui.TouchEvent;
    import net.rim.device.api.ui.TouchGesture;
    

    results in the error:

    cannot find symbol
    symbol: class TouchEvent
    Location: package net.rim.device.api.ui
    Import net.rim.device.api.ui.TouchEvent;

    what I'm doing wrong here?

    dognose

    You didn't mention what version of the JDE. TouchEvent only appears in JDE 4.7. If you try to use an earlier version, then you will get this error.

  • VmWare Esxi 4.1 HP ML350 "cannot find image.

    There is apparently a problem with the optical drive in the July 10 release support, HP of Esxi 4.1.

    Iso in questions is: 4.1_July_2010_ESXi_HD_USB_SD_Image_Installer_CD_583772_005.iso

    When you try to install this version of iso on a HP ML350 server with an optical drive manufactured by LGE and dated May 2010

    installation fails with a "cannot find system error or by the image.

    I got lucky to have several of these servers HP ML350 of recent fabrication available and I was able to determine that is a

    Install ESXi 4.1 was attempted with a former player specifically TS-H353 manufactured February 2010, it installs successfully.  As long as this DVD player was used to install the iso above, everything worked correctly regardless of when the rest of the server was made.

    In my humble OPINION, Vmware/HP needs to update Esxi 4.1 version to correct this hardware incompatibilities or compatibility list needs a caveat on this problem with the optical drive.

    It should also be noted that when the player is put in a server with a front Esxi 4.1 install in place and working, the optical drive does not appear as a host\Linux device in the virtual customer.

    Please note that I know that I have installed from USB or SD card, while that would have solved the problem of the installation, it only would have not corrected unable to mount the optical drive from the virtual Center host device.

    I have attached the scans of the optical drive label.

    We have exactly the same problem!

    On all our new ML350 G6, we cannot install ESXi 4.1 HP (583772_005.iso) image on CD.

    No idea, how we can solve this problem without use of external CD-CD-ROM-drives?

  • Error (58.28): cannot find the symbol; symbol: copy of the method...

    Hi all

    I have created a file in java to download and upload files on purpose to DB, but there is an error has occurred trying to (compile) the file which is:

    Error (58.28): cannot find the symbol; symbol: method copy (java.io.inputstream, java.io.outputstream) location: class.sun, misc. IOUtils

    Now, I downloaded the package Commons-IO - 2.4 should declare this copy method and added this package to: of project properties---> libraries and class-> commons-io path 2.4 - upload - the (binary) + commons-io - 2.4 - src.zip (source) (first of all, I added jar files are binary and the commons-io - 2.4 - src.zip)

    Watch: https://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/

    How to solve this error please?

    Note: I use JDeveloper 12 c

    You need not .zip source code at all.

    Then, extract somewhere commons-io - 2.4.jar (from the .zip file commons-io - 2.4 - upload - the) and add that pot in the same way as you have added the file .zup (.zip file to remove libraries)

    There is method copy()

    Of course, you must

    Import org.apache.commons.io.IOUtils;

Maybe you are looking for