How Keychar response faster? or should I use another method?

Hello, I have the following of keychar() here:

protected boolean keyChar(char key, int status, int time) {

if (key == Characters.some key){
            // do something;
            return true;
        }
if (key == Characters.some key){
            // do something;
            return true;
        }
                  .
                  .
                  . assigned 20 different keys to do different things
                  .
                  .
if (key == Characters.some key){
            // do something;
            return true;
        }
    return super.keyChar(key, status, time);
    }

I assigned 20 different keys to do different things, I guess that's because there are a lot of case statement, it slows down the device. If I click on too quick keys, the device used that response. For example, I click on a button for 5 times quickly, the device detects only 3 clicks. When I click on different key for several times quickly, and the device detects all the keys, I pressed on, but it takes time for the device complete the tasks I assigned to the keys after the key, press done.

I tried to created topics for "//do something" instead of putting the code in the stated case in the keychar, but there still works correctly. I was wondering is there any way to optimize for this situation?

Thanks for all your response types. Actually the keychar responses and detects the keys very well, I think I had problems with the 'do something '. I'll try to change it

I modified my code to 'do something', it works better now. Thanks for all your guys

Tags: BlackBerry Developers

Similar Questions

  • How can I add color to individual squares in a rectangle grid? Or should I use another method?

    I want to use a grid to create a repeating pattern and must be able to the squares of color individually.

    Use live paint.

  • Make a prototype for my class of multimedia learning and back to Captivate. This idea is possible? Or should I use another program?

    Hello!

    As mentioned, I'm a bit new to Captivate. I am familiar with its basic functions - I've done a few projects already - but I like to use my homework to help guide my learning through this program.

    For my class of multimedia learning, I do a prototype for a team project that is to teach students about specific plants: how the sunlight they need space, of water, as soon as they are completely mature, etc. Using the principle of guided discovery of Mayer (for learning MM), we want to make a game for students, and this is where my work (I'm the girl who is very quick to learn a technique and has already some experience of Captivate to his credit).

    We want to do a simulation where a character receives a plant at random his MOM. She should take care of this plant based out of the student / knowledge of the player (students will have studied it that the need for plants and made a request now that knowledge in this game). He will ask questions like, "what is this plant?" based on the image. Then, "when we it put? (in the House, on the edge of the window, in the garden, etc.). "When we should he water? (Daily, weekly, never, etc..). And so on.

    I never worked with variables with Captivate and thought this would be a good opportunity to learn. I thought that I could store the responses of the student as a variable and then at the end of the game, count the numbers, and if they have reached a certain threshold, the program will say: "Congratulations!" Your plant survived! "Or... "Oh no!" Your parched plant. You don't water it enough. "Or" Oh no! " Your plant dry too much sun! »

    Another thing to keep in mind is that the plant itself will be random, and the player should hopefully get a new plant whenever they play.

    So I was wondering...

    (1) variable will help me with this project? Or am I understand the term "variables" incorrectly as it applies to Captivate? It is possible that they work differently to how I imagine - once again, I've never worked with them before.

    (2) does it be a nightmare to create in Captivate or should I learn how to use another program? (I wouldn't mind another program of learning that I can add to my repertoire of skills)

    (3) any tips for this to work? Of course, I ask you to tell me how to do this project completely.

    (4) you say that an immediate return instead of feedback delay would be perhaps better here? If that were the case, I wouldn't need to use variables at all and instead just add a slide if they got the answer 'false '.

    You're talking about how many plants for the random plant? The only way I can imagine is to use a random number generated by JS, and an advanced conditional action which shows the plant based on this number. The random number, or the name of the plant itself could then be used in conditional actions more to ask appropriate questions.

    You can create a sequence of questions for each plant and use conditional navigation to send the student to the right sequence. In this case you can use the slides default question, which will be marked and at the end assess you the total score and provide feedback based on this score. This is possible when you enable branch of knowledge, so that only the questions that have been visited by the student will take into account for the quiz score.

    It is an idea for an answer to your first question. As I have explained, you don't need really variable (perhaps a random number), but advanced authoring knowledge or share actions.

    As a new attempt, the simplest is to restart the course. Maybe I could understand an alternative approach, but not right now.

  • I can't find my disc I have the product key should I use another drive as lon that I put my key

    I need to enter the ant find it year disk I use ego drive so much else as long as I use my product ket

    Hello

    "How to replace Microsoft software or hardware, order service packs and replace product manuals.

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

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • How can I change an application to use another library with a different name but the same name for public (easily)?

    When you perform comparisons between the programming approaches I create two libs with the same public calls but different internal components. Nothing special there. Unfortunately when I pass my test app to a lib to another, the application loader asks an all audiences of vi. But I thought I read somewhere that the application loader would get the idea where to look after that I saw the first public call to the new lib. Doesn't seem to work. With the help of 2010.

    Pull the lib not used out of the machine. Rename the current library under the same name that you used. Project save everything. Close to LabVIEW. Remove the current lib. Copy the another lib to the machine. Not necessarily easy but here's how I did similar exercises in the past.

  • How to connect and disconnect the smartglass using another account.

    Original smartglasses title: xbox

    How to disconnect and connect with another account xbox smartglasses in windows 8?

    Recently, I found that you can pass the player tags to an another Microsoft Account. That's what I'm doing right now. Try give it a go. You should be able to connect after that.

    http://support.Xbox.com/en-GB/billing-and-subscriptions/account-management/switch-Gamertag-to-different-Microsoft-account

  • How to get the ID internal interface using alternative methods

    Do anybody has an idea, how can I get internal ID of the Interface is there a substitution method I can use to get the code.

    I want to use this ID in the steps of the (GS) Knowledge Module.

    Hello

    You can use API, <%=odiRef.getPop("I_POP")%> to get the internal ID of the interface.

    Thank you
    Guru

  • Adding RAM to an HP Z800 - how many slots should I use?

    I'm about to add more RAM to an HP Z800. The computer has 12 memory slots. Today, I have 12 x 2 GB RAM modules, IE 24 GB of RAM. The processors are 2 x Intel X 5670 (processor-core/6). I have the BIOS version 3.21.

    I want to upgrade to 48GB of RAM and wonder if I should buy 6 @ 8 GB memory strips or fill all 12 slots with 4 GB modules. Both options give me 48GB of RAM. So the question is if I lose any performance using only 6 of the 12 sites of memory and if so about how much? What is the pros and cons with the help of 12 locations compared to the use of only 6 sites while leaving 6 unused when fill a system with the same amount of RAM?

    Intend to purchase Kingston memory, 2 x KTH-PL313K3 / 24G or 4 x KTH-PL313SK3 / 12G.

    Any useful response is appreciated!

    / Roger

    Roger,

    Because the price is not the issue here, they are substantially the same, I would look in the documentation for the HP. Should I use mode memory channel single, double or triple with 6 or 12 slots populated? With 12 slots, you are sure to use the memory in triple mode, with 6 I don't know, but with only 6 slots populated, you have opportunities for expansion in the future.

    There is a definite advantage in the use of 48 more than 24 GB, but is it wise to invest in this memory with your specific mobo and CPU, or wait for the SB-E as an alternative with 32/64 GB of memory, although at much higher prices but with OC-ability, you must decide which.

  • How to switch web browser and which one should I use

    How to switch web browser and which one should I use thanks

    FireFox.
    http://www.Mozilla.org/en-us/Firefox/new/

  • I have a toshiba satellite T135D laptop and I don't know how to start my built in webcam which program should I use?

    I have a toshiba satellite T135D laptop and I don't know how to start my built in webcam which program should I use?

    Hello George,.

    I could not find this model number on the Toshiba site, so I suggest that you look at this page as a place to start your search: http://support.toshiba.com/drivers . They had a driver for a webcam, which is perhaps what you are missing. But in all cases, the Toshiba site is where you are most likely to solve the problem with the help of your webcam.

    Let me know if this helps you.

    Kind regards

    BearPup

  • I have questions on the use of the commercial license... Which forum should I use to get answers or how I can get in direct contact with adobe?

    I have questions on the use of the commercial license... Which forum should I use to get answers or how I can get in direct contact with adobe?

    I have my answers! The chat feature did not work well... But I had contact, so everything is good now!

    Thanks again!

  • I want to manage my web isa with isa server management.help me how do I make and the port that should be used?

    I have an isa Server 2006
    I want to use the vpn connection and and limit internet access bandwidth:
    1. suggest a pdf for learning about this
    2 - to use web isa management utility which port should I use?

    Ask in the forum ISA Server:

    http://social.technet.Microsoft.com/forums/en-us/Forefrontedgegeneral/threads

  • Satellite L500-19 X - what speed of DVD should I use?

    Having just bought a laptop, as above I am faced the question of how fast DVD to use.
    John Lewis PC after sales help service advised me that time 16 DVD sometimes causes trouble and I should get 8 X and use them if possible even if they say they are now almost as rare a hens teeth. Say them a 16 X can be OK but X 8 would be more reliable.

    I have not started my laptop but as am waiting for supply of X 8 I found on Ebay as recommended DVD-R NOT + should be used. I see that the disc tray is marked rewritable + leading to more confusion.

    Make a copy of the operating system upon receipt of the X 8 and not before.

    All advice or comments would be most appreciated

    For a long time, I always use the same DVD and I have never, but never really noticed some problems burning, especially not to create recovery media.
    I use TDK DVD-R 1-16 x speed empty media.

  • What should I use for a replacement of WinMail in Windows.

    What should I use for a replacement from WinMail in Windows 7 when requires it a number of sites to meet an address or a link that the site offers an answer or a question.  I have msn, yahoo & gmail but lost WinMail when I've upgraded from Vista to Windows7.
    I lost WinMail thur a mistake some time & it was a nighmare tring to meet links on sites that requires to open a format Outlook, Outlook Express or WinMail.

    I have msn (hotmail), yaho & gmail, but none of them will come when I'm trying to respond to the link sites for a response. If one of those that should be used, how it equal in Windows7?

    Windows Update has nothing to do with the upgrade of Windows.

    Unlike Windows XP & Vista, Win7 does not have a default email Client. [What were thinking?]

    You will need to install a (e.g. MS Outlook;) Windows Live Mail; Oiseau-tonnerre) , and then set it as a default for mail in CUSTOM (<>) Set Program Access and defaults of the computer before any function article send to or MailTo will become available.

    You will find support for Win7 e-mail Clients in this forum: http://social.answers.microsoft.com/Forums/en-US/w7network/threads

    Support for Windows Live Mail (which will be able to import your data from Windows Mail Backup), you will find in this public newsgroup:
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Windows.live.mail.desktop

    Through your News Reader:
    News://msnews.Microsoft.com/Microsoft.public.Windows.live.mail.desktop

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • ADF: How to restrict data based on responsibilities using the JAAS implementation?

    Hello

    I have a requirement to limit the data of a user based on the responsibility that is assigned to.

    Let me explain my requirement in short.

    I am trying to create an EXCEL spreadsheet based for a creation of invoice using the ADF DI.

    Now when the user navigates the U.S. responsibility., then it should be able to view/Create invoice only for operational unit of the United States.

    whereas that, another user browsing responsibility UK should be able to see/create invoices for UK unit of operation only.

    Is this possible?

    I read a few posts on how the data can be filtered by using roles. However, since it is instance EBS R12, responsibilities allows instead of roles.

    The customer may not agree to create custom for each responsibility roles.

    Please help.

    Jdev version: 11.1.1.6.0

    Thank you

    AG

    Thanks Timo.

    The doc has been useful. However, as the customer is not eager to create roles for responsibilities, we would try to reach the requirement through session Management.

    In this way, the responsibility and the function details can be extracted from the EBS.

Maybe you are looking for