BlackBerry 9900 touch event not firing

Hey,.

I am new to the BlackBerry development and need help. I use a BlackBerry 9900 to test.

I have a single screen in my application that has several buttons. It reacts to the touch of the events if the button is highlighted.

Here is my code:

HorizontalFieldManager hfmRow = new HorizontalFieldManager();

_firstButton = new ButtonField("First");
_secondButton = new ButtonField("Second");
_thirdButton = new ButtonField("Third");
_fourthButton = new ButtonField("Fourth");
_fifthButton = new ButtonField("Fifth");    

hfmRow.add(_firstButton);
hfmRow.add(_secondButton);
hfmRow.add(_thirdButton);
hfmRow.add(_fourthButton);

add(hfmRow);
add(_fifthRow);

Try the following - replace / / perform a treatment with what you want on click

_firstButton = new ButtonField("First"); _secondButton = new ButtonField("Second"); _thirdButton = new ButtonField("Third"); _fourthButton = new ButtonField("Fourth"); _fifthButton = new ButtonField("Fifth");

HorizontalFieldManager hfmRow = new HorizontalFieldManager(){protected boolean touchEvent(TouchEvent message) {        int x = message.getX(1);        int y = message.getY(1); if (_firstButton.getExtent().contains(x, y)) {          //Do processing          return true;}else if (_secondButton.getExtent().contains(x, y)) {          //Do processing          return true;}else if (_thirdButton.getExtent().contains(x, y)) {          //Do processing          return true;}else if (_fourthButton.getExtent().contains(x, y)) {          //Do processing          return true;}else if (_fifthButton.getExtent().contains(x, y)) {          //Do processing          return true;}else{ return super.touchEvent(message);}}}; hfmRow.add(_firstButton); hfmRow.add(_secondButton); hfmRow.add(_thirdButton); hfmRow.add(_fourthButton);hfmRow.add(_fifthButton); add(hfmRow); add(_fifthRow);

Tags: BlackBerry Developers

Similar Questions

  • BlackBerry 9900 Smartphones do not receive emails

    I use my 9900 to the Japan and found that he has ceased to receive emails.  On previous visits he worked well and was OK for the first few days here.  Service status when e-mail works says:

    BlackBerry Internet Service: Mobile network

    Now shows not connected.

    The first time it happened, remove the battery several times did not help, but she came back a day later on its own.

    Next time (1 week later) I had the problem I did a full restore using the Blackberry Desktop Software since before I arrived at the Japan and that fixed the problem up until this morning.   Now neither full restore or remove the battery support.

    If anyone can shed some light, I would be very grateful.

    Thanks in advance.

    Back in the United Kingdom and the same problem.  Spoke with my account provider and the deleted and then restored the email accounts on their system and all accouunts on the phone are now receiving mail, so it seems that it was a problem of system with my provider here (EE).  They were more on the ball than usual.

    Thank you for taking the time to answer.

  • AftProcMap event not firing

    Hi all

    Can someone of you think of a reason why the event script AftProcMap is fired not when importing, or when you perform a recalculation?

    We use v11.1.2 and I tested with a write to a file and is not triggering at all (and is not the BefProcMap event).

    If I run the script so that it opens in the Workbench client is to produce a text file as expected, so I know the script itself is valid but I can't seem to run during the treatment.

    Concerning
    Stuart

    You need at least a not explicit card.

  • BlackBerry Smartphones BlackBerry 9900 sending does not BBM Z10 and Q10

    Most of my colleagues use Q10 BB or BB Z10 and I have BB bold 9900, but I can't send them BBM I can receive their BBM. Help, please!

    Hello

    Thanks for the confirmation!

    Regarding your question, there is already a Knowledge Base article that is associated with this error:

    KB34245 : A checkbox, and then a red x appears when a BlackBerry smartphone running BlackBerry Device Software 5.0 or BlackBerry 6 to 7 sends a message to a smartphone BlackBerry 10 via BlackBerry Messenger 7.0.1.23

     

    In my opinion # Workaround seems to be a little hard.  So I prefer you should first try to reinstall the BlackBerry Messenger application and see if it helps with your current problem.

    To make your homescreen go to Options > device > application > locate and delete BlackBerry Messenger from this list.

    KB10040 : How to view or delete the application installed on a blackberry smartphone

     

    Deleted once perform a battery pull reboot by removing the battery while your device is turned on, wait a min. and then reinsert this return.

    Finally, after the reboot, use your BlackBerry browser and go to www.blackberry.com/bbmdownload and download the most recent version available. After installation, restart your device once more, connecting with your BlackBerry ID and check if you are able to send BBM to one of these devices.

    Please try it and let us know of your progress.

  • BlackBerry 9900 Smartphones do not scroll in applications

    My 9900 scrolls very well until I'm in any application, then it does not scroll. Everything else seems to work very well. Really not sure how to fix this problem.

    Hello and welcome to the community!

    Each time a random strange behavior or slow creeps, the first thing to do is a battery pop reboot. With power ON, remove the hood back and remove the battery. Wait a minute, then replace the battery and cover. Power on and wait patiently through the long reboot - about 5 minutes. See if things return to functioning. Like all computing devices, BB suffers from memory leaks and others... with a hard reboot is the best remedy.

    Best!

  • Tween start event not fired?

    Hello

    I have this code below that produces no error:

    import the map;

    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;
    Import fl.transitions.TweenEvent;

    var ace_clubs1:Ace_clubs = new Ace_clubs();
    ace_clubs1. ScaleX = 0.4;
    ace_clubs1. ScaleY = 0.4;

    var myTween_end = new Tween (ace_clubs1, "y", None.easeNone,-110, 700, 1, true);
    var myTween_begin = new Tween (ace_clubs1, "x", None.easeNone, 0, 400, 1, true);

    myTween_begin.addEventListener (TweenEvent.MOTION_START, onStart);
    myTween_end.addEventListener (TweenEvent.MOTION_FINISH, onFinish);


    function onStart(e:TweenEvent):void {}
    trace ("Begin");
    }


    function onFinish(e:TweenEvent):void {}
    trace ("End");
    }

    addChild (ace_clubs1);

    The only thing is the output of TRACE for the MOTION_START EVENT does not fire. Someone knows why?

    Thank you

    Jim

    Do not start tweening until after the event listener is assigned, if not, you missed the event - when you instantiate, it starts.  Then try to add:

    myTween_begin.start ();

    right after the listener is affected.

  • event not firing from modification code list

    I have a list where the change event is set at a "listChanged" fire function. All right when I actually click a list item to trigger the change. It also works fine if I use the arrow key to move up in down on the list.  However, if I make the change in the code (like this: dataList.selectedIndex = 1 ;) the list item is selected, but the event is triggered.)

    Anyone have any ideas why this is?

    cdub,

    The 'change' event is activated when the user interacts with the list to change the selection (mouse clicks, arrows, etc.). The 'valueCommit' event is raised when the selection is changed programmatically.

    Jason

  • Sign-up at RemoteNotifier events not firing after having invoked method

    I'm setting up an iOS app.  I need to use the APNS.  The application is implemented at Apple and works, but I am unable to test Push Notifications because I am unable to get a token device.  From my understanding deliverance RemoteNotifier.subscribe should RemoteNotificationEvent.TOKEN to fire.  This never happens.  The code is below.  None of the RemoteNotifier fires.

    var preferredNotificationStyles:Vector. < String > = new Vector. < String >;

    preferredNotificationStyles.push (NotificationStyle.ALERT);

    preferredNotificationStyles.push (NotificationStyle.SOUND);

    preferredNotificationStyles.push (NotificationStyle.BADGE);

    var subscribeOptions:RemoteNotifierSubscribeOptions = new RemoteNotifierSubscribeOptions();

    subscribeOptions.notificationStyles = preferredNotificationStyles;

    var rn:RemoteNotifier = new RemoteNotifier();

    rn.addEventListener (RemoteNotificationEvent.TOKEN, sendDeviceTokenToServer);

    rn.addEventListener (RemoteNotificationEvent.NOTIFICATION, notificationReceivedByApp);

    rn.addEventListener (StatusEvent.STATUS, subscriptionFailureCallback);

    RN. Subscribe (subscribeOptions);

    I was able to get this working by moving the code that deals with RemoteNotifier in its own actionscript class.  I initially had it inside of the

  • Click on replace touch event on tablets?

    Hello

    The click event replace the touch events on the shelves?

    I have a side project that I need to work on the computer and iPad.

    But I can't tell if it's the click event that works or the touch event is working on the Ipad

    Can anyone help?

    Hi Robyn,

    Events Click will be not to replace the events of button on iOS devices - both types of events are supported.

    However, touch events are fired instantly on touch and override to slam events if both co-exist on the same element. Also, the click event handler in the iOS have a predefined time about 300 MS to allow touch events (if they exist) to fire first.

    HTH,

    Joe

  • BlackBerry Smartphones BB does not illuminate

    Hello please help me my blackberry 9900 display does not illuminate. the device lights up red liught comes off and her but he just using the screen please help

    Hello nihalbbman1

    This nuked BB. Take it to a hardware technician.

  • BlackBerry Smartphones Blackberry 9900 - after wipe security, configuration of email won't work - does not install

    9900, do you have a security wipe and restore data from Device Manager, now can not enter email Configuration.

    I returned to 9900 after using a Q10 which is faster, etc, but I missed my Blackberry 9900 navigation.

    Then returned to 9900, made security wipe, now I can't set up the email.

    -After clearing security, before registering on the network configuration of email will ask me for my journal ing business (I'm not business) so I have no one.

    -After registering you have the network AT & T, configuration of e-mail now ZERO, NADA, ZIP!  By pressing the icon does nothing!

    -Having gone through all of the suggestions that I can find on similar topics - with no luck

    -redo the security wipe

    -restored from old backup

    -went to mobile.blackberry.com - but this site goes to us.blackberry.com and has no communications tab

    -go to blackberry.com/integrate - tried to install email - but without code number error message appears

    PLEASE HELP-

    Thank you

    They did resend service books?

  • BlackBerry Smartphones Trackpad does not - Touch screen work

    I bought a Blackberry 9900 in September 2011.

    in July 2012, I had the phone replaced under warranty as the WiFi signal went funny (he was VERY weak all the time) as the speaker was roaring because of play a little hard, so I got the handset replaced under warranty.

    Blackberry 9900 replacement handset was working fine until about a month, when my trackpad kept work stoppage. I thought that my phone had frozen, but I could still navigate the phone using the touchscreen. the trackpad works again after 10 seconds.

    I tried to restore the firmware of phones at the factory version, I also tried the last updated one (7,1 Bundle 2061), but still no joy - im guessing the problem is hardware related.

    What are my options?

    my phone is not covered by manufacturer's warranty is it?

    Hello and welcome to the community!

    I suggest a completely clean OS reload... perhaps to aid installation method below 'skeleton' slow...

    At the top of each forum device, there should be some 'sticky' threads dealing with the level of the OS available for many models. If they understand your model, please use those as a reference as you go along. Otherwise, you will have to dig through the download portal official for packages of OS for your model:

    From a PC, you can install any compatible OS package (for example, for your BB model exact number) of a BB via this procedure:

    Note Although written to "recharge" and the storm, it can be used to upgrade, downgrade or recharge any BB device model - depends on the operating system package you download and install on your PC. If this OS package comes from one carrier other carrier for which your BB was built, then remove, on your PC, all copies of the SELLER. XML... There will be at least one and maybe 2, and they will be located in the same way or to (it changes based on your version of Windows) these files:

    • C:\Program Files (x 86) \Common Files\Research In Motion\AppLoader
    • C:\Users\(your Windows username) \AppData\Roaming\Research In Motion\BlackBerry\Loader XML

    Don't forget that you remove, since your PC, any other BB OS devices as packages with more than one installed on the PC can cause conflicts with this procedure.

    You can also study the use of BBSAK (bbsak.org) to perform the wipe what he is capable.

    You can also try this procedure might limit the specific causal element:

    1. Load your OS "bare bones"... If everything is optional, do not install it.
    2. If the behavior is immediately, then try another OS with step 1
    3. If the behavior does not immediately, then run for as long as necessary to make you to be sure that the behavior will not occur.
    4. Add one more thing - no matter how tempting, one.
    5. If the behavior does not immediately present, and then runs for long enough to be sure he won't have the same problem
    6. Repeat steps 4 and 5 until all things are responsible or the behavior presents

    When the behavior shows up, you know the culprit... the last thing you have loaded.

    If the behavior doesn't re-present, then you know that step 1 or 2 cured it.

    If the behavior has anything, then you have probably a problem of material level for which no amount of OS or software can heal.

    If you are on a MAC, you are limited to only your sanctioned carriers OS packages... but can still use any level they currently have to sanction. See this procedure:

    • KB19915 How to perform a clean reload of the smartphone BlackBerry using BlackBerry Desktop Software application software

    BenRichardsFife wrote:

    my phone is not covered by manufacturer's warranty is it?

    Only your warranty provider can answer this question for you. Everyone must respect all terms of warranty you received with your purchase (your contract, purchase, governs all), which can be less or more generous than those extending from the RIM. There might be a good read for you here:

    Good luck and let us know!

  • How to manage touch event in the field

    Hello

    I created field checkbox custom, when am touch event for her manipulation, emphasis is gettting inside, and when I try to click on any other components such as the box native, afer by unchecking the custom check box, the custom box is clicking again.

    How to handle this?

    Thank you

    Rakesh Shankar

    There are certain basics that one needs to understand to effectively manage key events:

    (1) touch events are sent to the field currently has focus and the enveloping managers, including the active screen.

    (2) default response of the system to the event down is to divert attention to the field to the position of touch If there is a focusable it. If there is no focusable point touch field, the field currently has focus is unchanged. There's no "unfocus everything ' method in BlackBerry (there might be, but it is not readily available - there is a protected method focusRemove, but it is supposed to be used in conjunction with a later focusAdd protected in cases where the field has changed its focus rectangle - a classic example is any input field or text such as EditField or RichTextField view)

    (3) the default action of TouchEvent.CLICK is to call trackwheelClick (which, by default, invokes navigationClick) which is a great way to ensure consistency between the 'clicks' and clicks touchpad screen. The same is true for unclicks finally managed by navigationUnclick.

    If you want to disable the click by default if the key is outside all focusable fields and will not disrupt the rest of the system, just return true if the event is to CLICK, but the contact details are outside the scopeand actions super.touchEvent otherwise. And keep your return true; on all UNCLICK events: it's a good idea if you don't want to see the context menu from appearing each time or field click reaction called twice.

    The example of Peter was written when I've heard most of it already, but now I realize that you can do a lot easier. See part highlighted the previos section.

    Good luck!

  • Are the touch events in new broken ripple?

    Hello

    I have a PlayBook application that uses touch events to shake things. I tested it in the stand-alone version of ripple and the physical device.

    Now I think on porting the app to BB10, so I downloaded the verion of ripple Chrome and I found that in the waving of the new, I can't move any object!

    I've identified the problem, but I don't know how to cope. Here is a small HTML file that shows the problem:

    http://www.w3.org/1999/xhtml">
    
    
    
        
    child

    So basically there is a div container that listenes to the touchstart and if this event happens that it displays an alert. In the ripple of old (and on the PlayBook device) If you press the 'child' div the alert is also shown (the event is pushed down and intercepted by containers). In the waving again, it happens.

    Any suggestions? I can force ripple action as does the Playbook? Maybe I should use another technique to capture touch events?

    Hi razorek,

    I'm not sure of the reason (his behavior of WebKit), but the propagation of the event using the AddEventListener method will allow when you use touchstart. Take a look:

    http://www.w3.org/1999/xhtml">
    
    
    
        
    child

    Also, when using ripple for Chrome, please make sure that "Emulate touch events" are not verified, since ripple there are tactile own emulation system and it may come into conflict with it.

    F12 (Open Developer Tools) > click on the gear icon in the lower right > Exceptions tab > emulate the Touch events. I'll also post this work around for that matter https://github.com/blackberry/Ripple-UI/issues/344 github page

  • stimulate the touch event handling in PRC?

    I want to stimulate the touch event in another application. can someone help me in explaining to me with a code example.

    I'll pass on this one, whenever I give you an answer to a topic, change you what you wanted in the first place.
    First of all, you wanted to listen to the event:
    http://supportforums.BlackBerry.com/T5/native-development/touch-does-not-fire-for-Q10/TD-p/3026980

    Second, you were finally made in the PRC:
    http://supportforums.BlackBerry.com/T5/native-development/touch-event-handling-in-CPP/TD-p/3027043

    Third, you asked to simulate a key event in this thread I made.

    Now, this isn't what you want, you want to simulate a click on a button.

    I'll let someone else answer that one.

Maybe you are looking for

  • UPDATE FLASH - UNWANTED SOFTWARE

    I had to FLASH so it works on some sites. The UPDATE installed McAfee without my consent! I DON'T WANT MCAFEE ON MY SYSTEM! There is NO solution to this except to UNINSTALL the #$%! thing. This is just a warning to those who upgraded their FLASH.

  • Windows Vista update - big problem

    Whenever I have install the last update for windows Vista Edition home premium, the locks on my computer and I need to format it to use it again. He already heppend 3 times, in the first I didn t know it was because of the update, the second time, af

  • Failed to create system restore point exception exception c:\windows\system32\shell32.dll,control_rundll,"c:\windows\system32\sysbm.cpl",system

    Original title: I can't do a restore point. I get exception c:\windows\system32\shell32.dll,control_rundll,"c:\windows\system32\sysbm.cpl",system what can I do? This has happened for a very long time.

  • CD and DVD player will not open or read

    My USB does not open. I got the message no program associated with the file. I reformated the by the advice of Verbatum USB flash drive.  Now the Flash Player works fine, BUT no optical drive will not work.  I can insert a disc into the CD or DVD dri

  • account administrator deleted-. -.

    I don't know what ive done, but now I can't find newspaper anf with my administrator account, and only with the comments... prompt, I see all my programs, but I can't access their topic... that's happened? What can I do?