Problem with the touch event

Hi guys,.

I overrided the onTouchEvent on the ground and the following code does not work for certain fields (all are focusable):

    protected boolean touchEvent(TouchEvent touchEvent)
    {
        if (getExtent().contains(touchEvent.getX(1), touchEvent.getY(1)))
        {
            if (touchEvent.getEvent() == TouchEvent.DOWN)
            {
                down = true;
                invalidate();
            }
            else if (touchEvent.getEvent() == TouchEvent.UP)
            {
                down = false;
                invalidate();
            }
        }
        return super.touchEvent(touchEvent);
    }

Do you know why?

Resolved. Need to check the limits of rect.

Event is called only for a good INTERFACE control.

Great!

Tags: BlackBerry Developers

Similar Questions

  • Problems with the touch screen of HP all-in-One after upgrading Windows

    I recently updated my version of Windows (64-bit) with system updates and then a full version updated to version 8.0 version 8.1.  After the update is complete, I started to experience a strange problem with the touch screen on my HP Envy Rove.  The screen would flash repeatedly one set of points in the right lower quadrant of the screen as if the simulation random screen button.  There is no way to stop this.  If the screen on a keyboard was pulled up, letters in the place of the flashes would be broadcast in the fields on the screen.

    The only way to stop the flashes of screen has been to go into the Device Manager and disable the HID-Compliant device driver.  It stopped (system generated keys) flashes, but also disabled my touch screen input.  So now the system is usable, but without the benefit of the touchscreen.

    Here is the information on the driver:

    HID-Compliant device

    Date: 21/06/2006

    Version: 6.2.9200.16851

    (input.inf)

    I tried updating the driver, but this seems to be the latest version available.  Go back to the previous version of the driver, could solve the problem, but I could not locate on the support web site.

    Any suggestions on how to solve this problem and re-enable the ability of my touch screen?

    Hello

    Downloaded drivers from the manufacturer will be the most tested and up to date available. The best place to download a driver is directly from the manufacturer of the equipment.

    So I suggest you to install the driver that is available on the HP website for your model.

    Troubleshooting of touch screen in Windows 8

    http://h10025.www1.HP.com/ewfrf/wc/document?cc=us&LC=en&DLC=en&docName=c03488148

    Just reply with the results.

  • Problem with the onChange event

    Hello

    I am currently facing a problem with the onChange event when you use a datefield entry type.
    for example
    < cfinput type = "datefield" name = "date_txt" width = "175" mask = onFocus = "date_txt.disabledDays" dd/mm/yyyy"= [0.6]; "tabindex ="1"style =" "text-align: left" onChange = "checkDate (); ">

    And then, when I alert the selected date in checkDate function, I still get the old figure.
    for example
    public function checkDate (): Void {}
    Alert ("Date:" + date_txt.text);
    }

    For example if the date displayed is 05/05/2008 and I select another day (05/02/2008), then when the alert box appears, it still shows 2008-05-05.

    Any idea on how to solve this problem?

    Is this a bug with Flash Forms?

    Thank you and best regards,
    Yogesh Mahadnac

    I suppose that the function onchange occurs before the value of text is actually defined.
    Use the correct value
    Alert ("Date:" + date_txt.selectedDate);

    Ken

  • Strange problem with the keyboard event listener

    I have a full screen touch app. To close the application, I set an event listener on keyboard for the key "0". I don't want the press user due to some restrictions Alt + F4 key combination. Problems begin when the application loses focus. Here's the code;

    protected function onComplete(event:FlexEvent):void
    {

    this.setFocus ();
    this.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys, true, 0, true);

    }

    private void trapKeys(e:KeyboardEvent):void {}

    If (e.keyCode == 96) {}
    This.Close ();
    }

    Else if (e.keyCode == 48) {}
    This.Close ();
    }

    }

    When the user change the screen to a different with Alt + TAB application, or any other combination of keys flex app loses focus and does not work when he turns back to my app "0". How can I solve this problem?

    Thanks in advance.

    Hi, Ahmed.

    I have absolutely no problem with the solution you are trying to set up - you use mode full-screen interactive mode of keyboard?

    Please consider:

    on full add keyboard listener

    protected function applicationCompleteHandler(event:FlexEvent):void

    {

    this.stage.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

    };

    //

    protected function applicationActivateHandler(event:AIREvent):void

    {

    If (this.stage)

    {

    switch the State to display full-screen when activated

    If (this.stage.displayState! = StageDisplayState.FULL_SCREEN_INTERACTIVE)

    {

    this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

    };

    };

    };

    //

    private var exitHandled:Boolean = false;

    on NUMBER_0 | NUMPAD_0 exit-close

    protected function trapKeys(event:KeyboardEvent):void

    {

    If ((event.keyCode is Keyboard.NUMBER_0

    || event.keyCode is Keyboard.NUMPAD_0)

    (& this.exitHandled == false)

    {

    exitHandled = true;

    this.stage.removeEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

    This.Close ();

    };

    }

    (Note: applicaton of the events 'applicatonComplete' and "applicationActivate" are routed to over managers)

    Kind regards

    Peter

  • I have a problem with the touch screen of Sony.

    Original title: "Sony touchscreen issues."

    I am running Windows 7 Home Premium on a Sony All In One with touchscreen. For about 4 weeks, I got a problem with weird things happening on the screen. For example, I can use any application and it will automatically become minimized and I'm now looking at the level of the office. Other times on keyboard screen will appear in itself. Do not know what is happening, but it sure is frustrating the heck out of me. Answer from Sony is that I put the computer back to factory settings, thus losing my files and programs. Is there a way I can back up the system and retrieve my programs from the backup. I don't know if I can find my original downloads, including Office 2010.

    Thanks a lot for your help.

    Dennis

    Hello

    IAM having the same problem with my Sony all in one touch with Windows 7 home Premium edition running, did you get your problem solved, please let me know what I need to fix, it is very annoying to use the computer now that the application itself minimizes every minute.

    Help, please

    -Irshad

  • A big problem with the touch sensor A / V controls!

    My model is VGN-CS320J. Touch sensor A / V controls had been working properly until I installed Windows 7 Professional on my computer. These controls have now stopped working. I can drag is no longer my fingers to adjust the volume. Although I tried to reinstall "Synaptics pointing device", they always fail.
    Could someone help me?

    Hello 918353, the user

    Apologies, you have problems after the upgrade to windows7
    not all features will transfer to windows7 from vista as it is noted in the two methods.

    Upgrade (Recommended)
    [url: 2zl7xsgr] http://esupport.sony.com/US/perl/support-info.pl?info_id=508 [/ url: 2zl7xsgr]

    Clean install
    [url: 2zl7xsgr] http://esupport.sony.com/US/perl/support-info.pl?info_id=507 [/ url: 2zl7xsgr]

    However, for just the shortcut keys that you speak, those who would fall under the control of the laptop and utility found here
    [url: 2zl7xsgr] http://esupport.sony.com/US/perl/swu-list.pl?mdl=VGNCS320J&SelectOS=47 [/ url: 2zl7xsgr]

    If this does not help try reaching us via live chat!
    [url: 2zl7xsgr] http://www.omnitechsupport.com/sony/index.php?queue=ComputerPFS&OWChat=1&VARSET_MODELNUM=VGNCS320J [/ url: 2zl7xsgr]

    Best regards
    Kimberly

  • Major problem with the touch screen after upgrade Windows 10

    I bought a Lenovo Yoga 3 14 "a few weeks ago and upgraded to Windows 10 as soon as I got it.

    Since I started using it, the touchscreen will be occaisionally go "crazy". Crazy is the best way I can describe it because it will start input touch by ignoring or doing his own random touch input on the screen. Nothing the laptop will start to switch between windows and opening and closing of the things.

    This laptop is not running Windows 8.1 long enough for me to know if she has had this problem before the upgrade.

    Any ideas?

    Nice day.

    For information, please see: https://forums.lenovo.com/t5/Lenovo-Yoga-Series-Notebooks/Yoga-3-14-inch-Touch-Screen-Issues/td-p/20...

    and then more precisely: https://forums.lenovo.com/t5/Lenovo-Yoga-Series-Notebooks/Yoga-3-14-inch-Touch-Screen-Issues/m-p/214...

    I hope this helps.

    Kind regards.

  • Problem with the ENTER_FRAME event from a loaded mc

    I have a UILoader on the main timeline, then I have to load an external mc with an event ENTER_FRAME inside. When I insert something else, I found that the ENTER_FRAME event still works. Why he is not credited with the mc?

    This is as3.  all streams, intervals and events which are not dependent on the interaction of the mouse are running.

    If you publish to fp 10, you can use the class loader and unloadAndStop().  otherwise, you must stop explicitly all fumes, etc. before unloading.

  • Problem with the entire event looks like a bug

    Hello

    I got a requirement like this, there are two text fields Textfield1 and Textfield2 to say, and Textfield1 is full it should automatically go to textfield2 and fill the characters typed on the keyboard. I had this implemented using comprehensive event. If Textfield1 is full change focus to Textfield2.

    Now, I met a very strange question, i.e., the last character I enter Textfield1 won't Textfield2. His only full because is triggered to the key of the last character.

    I tried other alternatives did not work.

    Guys, now I do not understand is that true. Someone had the same problem.

    Thank you for all that you do.

    Yes, I used this script

    xfa.host.setFocus ("TextField2");   in my complete case. However, I could solve the problem by using newText and limiting the length to 50.

    Now I got a different question, that is, it does not work if I enter all uppercase the TextField1.

    Reason for the number of characters is different for upper and lower case. Don't know how to handle this.

    In addition, I expect to complete event can be a solution in this case, however if I use full event and you change the focus to new textfield the last key shot strays.

    Any help on this would be much appreciated...

  • Problem with the touch screen on SWITCH 10

    Hello

    Today, I have a problem of strainge - my SWITCH 10 now do not react on my touch. Keyboard ability very well, but when I have a touch screen - nothing happends. Reload - nothing happened. May be that I disable it somehow?

    Hope for your help


  • Problems with the script to output event

    In fact I don't know if I have a problem with the Exit event or if there is something wrong with my script syntax... The output of a field event, I check if the field is empty or not and check a flag I put in place.

    The first if statement works - if I get back a value in the field, everything goes as planned. If I delete the value of the field, nothing happens.

    //if field has a value hide subSection04
    if (!(this.rawValue == null || this.rawValue.length == 0))
    {
         subSections.subSection04.presence = "hidden";
    }
    
    //if field is empty and flag equals true show subSection04
    else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == true))
    {
         subSections.subSection04.presence = "visible";
    }
    
    //if field is empty and flag equals false hide subSection04
    else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == false))
    {
         subSections.subSection04.presence = "hidden";
    }
    
    There are a few groups radio button that also control this behavior, they are all inter relate. So I tried also triggers the Click event of a radiobutton Group (which resembles the value in this field) out of this area, but that doesn't seem to work.

    Hi Jono,

    Your expression subFlags.Commercial.rawValue is true compares a String data type with a Boolean data type.

    Edit the expression as subFlags.Commercial.rawValue is 'true'

    I hope that this should work for you.

    Your code should look like

    //if field has a value hide subSection04
    if (!(this.rawValue == null || this.rawValue.length == 0))
    {
         subSections.subSection04.presence = "hidden";
    }
    
    //if field is empty and flag equals true show subSection04
    else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "true"))
    {
         subSections.subSection04.presence = "visible";
    }
    
    //if field is empty and flag equals false hide subSection04
    else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "false"))
    {
         subSections.subSection04.presence = "hidden";
    }
    

    Nith

  • Problem with the controls volume/internet on my laptop HP HDX 16

    Hey,.

    I have a laptop of HP HDX 16, around the age of 8 months. I keep having problems with the touch buttons that controls volume, bass/treble and the internet. The buttons randomly disappear by themselves, turn on and off Alternatively my volume/bass/treble from top to bottom and my internet.

    I have updated the drivers for the buttons to quick launch without result. I've also just updated my computer to Windows 7, so my Bios is brand new (the problem started before I updated to 7).

    As you can imagine, get my internet randomly stops and for the black volume screen blocking what I was doing and hang my computer is getting pretty annoying. Any help on this would be surprising.

    Thank you
    Printertron

    I also have the same problem. HDX 16, around the age of 3 months.

    I found to do all sorts of updates the driver, uninstall, System Restore (no), and does not help.

    I'm still on Vista, but when I get my kit to upgrade to Windows 7, I had planned to see if it resolved the problem.

    Technical support HP told me that if a recovery does not resolve the problem, it must be delivered to them, and the band of totality quicklaunch may have to be modified.

    I intend to make the recovery during the holiday season.

    Based on the fact that you got your computer 8 months ago, I assume that you have not used an upgrade kit. Which means, I would recommend doing a recovery before calling the technical support because they will just have to insist that you do anyway.

    An interim solution, when the volume control locks your screen is at the end of the process called "SmartMenu.exe". It will reload the next time that you start your computer.

  • Since 10.11 I have not been able to download via the usb port of my Davis Vantage weather station. No solution of tech Davis on the issue even with the new recorder of events in the resort. Is there a problem with the usb?

    Since 10.11 I have not been able to download via the usb port of my Davis Vantage weather station. No solution of tech Davis on the issue even with the new recorder of events in the resort. Is there a problem with the usb?

    What Mac? (details)

  • Problem with the change in value of listbox event

    Hello

    I have a problem with the help of Listbox value change event. The code that I have attached is a simplified version of the largest program, but the problem is the same. One of the loops of Nonna is responsible for handlig occurring events ant the other is responsible for the execution of the program. In the project of oryginal I use a listbox control to determine which plots graphic display of a waveform is visible (first position of the listbox-> only plot first visible etc.). In the attached vi, I just show the current value of the listbox control. The problem is the event runs only once and then the program crashes. I want to be able to change the value of the listbox work both at idle and in State of a program, but when I put the structure of the event in both States, he does not. I'd be very grateful if someone smarter than me could tell me where I made my mistake. I want my program to be able to manage the keys and listbox events in States (slow down and knit) program.

    You have two structures of event in two cases different from the structure of the case, and both are tuned to listbox events has changed. Because only once can be triggered at any time, the VI crashes (lock events the front panel (default) until the event can complement).

    You must use a unique event structure managing all events.

    The overall program architecture looks like inside-out for me.

    For the buttosn, you must use action lock (switch not release!) and use the value changed events.

  • Problem with the event

    Hello
    I am facing a problem with the events. Please Ref. Event.zip the attachment.

    AEv.vi is a LV2G used for the reading/Generate/Init/destroy the event. Test2.VI is a main vi (we must run this vi)

    The AEv.vi Init action must be done in the other vi (other than the Test2.vi:- but for the objective test I've initialized in Test2.vi only).

    Test2.VI is used for genetate event.

    I could have called statically AEv.vi inside the Test2.vi to generate an event... but the path that comes is decided when running... (I have many live similar to AEv.vi...) .. who decided at run time...)

    The problem:

    When I run Test2.vi, it gives me the error code 1 (try running test2.VI... it gives the dialogue on the occurrence of the error)...

    Can someone fix this?

    Thank you!

    I modified your screws to do what I think you want.  The way you did the user events will not work.  I added a line to send orders to Ev.vi

Maybe you are looking for