Convert Dialog.alert to handle the touch event

Anyone know how I can convert my dialog.alert to handle the touch event

Please help me = D

You don't need - if you use the standard RIM dialogue he class shoud touch event itself.

Tags: BlackBerry Developers

Similar Questions

  • 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.

  • 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

  • Nature of the touch events

    Hello ladies and gentlemen,

    I am currently working on activating the touch support to an existing application to my friends, and I'm running into some difficulties. My screen consists of a few: on the bottom, I have a row of BitmapFields acting as buttons all content in a HFM, above that I have a great EditField, and above I have a HFM with a few more selectable BitmapFields.

    First of all, I'm not sure that should be implemented in touchEvent(), my managers or the fields themselves. I tried both, but noticed a strange behavior. It seems that the field that currently has the focus Gets the touchEvent little anywhere on the screen, the key event occurs.

    I think that the OS would simply understand that touching an object simply focusable means 'set the focus to this item"and clicking on the object means 'click on this object', I don't think you should even implement the touchEvent() method to achieve this effect.

    Does anyone have experience of writing applications for the storm? Am I missing something?

    Thank you
    Tyler

    Thank you Rex,

    I did a search on "touchEvent" but did not find much.

    Oops, looks like I just got this job.

    Let me explain what I have in case someone else comes on this thread:
    -My screen has a 'top manager' who handles most of the items on the screen, including other managers

    -J' have a HFM at the bottom of the screen (which is managed by my Senior Manager) that contains several BitmapFields that act like buttons
    -The question I had was trying to setFocus in the appropriate field when this field was hit

    Here's what I added to my managers to manage events:

    protected boolean touchEvent(TouchEvent event)    {        //Figure out where the touch occurred on the screen        int globX = event.getGlobalX(1);        int globY = event.getGlobalY(1);
    
            //Determine if the touch occurred within the extent of this manager        if (getExtent().contains(globX, globY))        {            if (event.getEvent() == TouchEvent.DOWN)            {                //Get the position of the touch within the manager                int x = event.getX(1);                int y = event.getY(1);
    
                    //See if there is a field at this screen position                int fieldIndex = getFieldAtLocation(x, y);
    
                    if ((fieldIndex >= 0) && (fieldIndex < getFieldCount()))                {                    //Set the focus to the field at this position                    Field f = getField(fieldIndex);                    f.setFocus();                }
    
                    //Return false so that the event propagates to the contained field                return false;            }        }
    
            //Event wasn't for us, handle in default manner        return super.touchEvent(event);    }
    

    In addition, you must ensure you set the scope of your managers correctly, both real as virtual, I usually do when I'm in the override of the sublayout() method.

    Hope this helps people.

  • QML: calculate the time interval between the touch events

    I create a custom button that is activated by a key event, in this way:

    Container {
        property bool pressed
        signal clicked...
        onTouch: {
            if (enabled && ! event.isMove()) {
                if (event.isUp() && pressed) clicked()
                pressed = event.isDown()
            }
        }
    }
    

    The problem with this approach is that if the user clicks the custom button several times in a short period of time the click signal is triggered several times too. This does not happen if I use a regular button or an ImageButton.

    I was thinking about getting the timestamp of the event and fire the only if clicked event grit touch after at least x milliseconds since the previous event. The DIF is that I couldn't find a way to calculate this difference in QML.

    Any suggestions?

    You could also follow the time of the last event with the Javascript date.

    lastTouched = new Date().valueOf();
    

    -Check if time has passed...

  • How the MovieClip not to block the touch events

    Hey guys,.

    I'm trying to do something that should be simple.  I have a listener to button a button, this button has a MovieClip that is located on the top, so my button below will not receive the click event of the mouse.  How can I keep the MovieClip above the button but allow the mouse click event move to the button?

    Thank you

    Assuming you named the MovieClip "myMovieClip".

    To write

    myMovieClip.mouseChildren = false;

    myMovieClip.mouseEnabled = false;

    The ClickEvent must spend in the MovieClip safe and sound.

  • A dynamic event - handle the two event 'user' and "value change" reference

    Hello everyone,

    I'm trying to manage in a structure unique event two upcoming events of the change in value of references and user events.

    However, these two types are looking for bundles. Someone has already tried to do something like that?

    Thank you

    Alessandro

    Do not use 2 register for events in a single node node add events and the Coachman.

  • 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!

  • How to handle the "DB_EVENT_PANIC" event on the replica

    Hi experts BDB.

    I write db HA 4.6.21 the bdb version-based application. Two processes running on two machines, a master who will be read/write db, one as a desire to only read backup db. It seems backup will sometimes get 'DB_EVENT_PANIC' event for reasons that I didn't. What should I do upon receipt of these events? Should the devil out and run it then open env again for recovery? A process can reopen the environment for recovery without exit first?

    Another issue is not related to the above question: If use bdb ha (api base), can it be 3 process, termpol1 is neither master nor customer but simply write db, process2 is as master of rep that open the same env (just for ha, will not write db), process3 is the client that connects to the master to get synchronized db?

    Thank you

    Min

    I write db HA 4.6.21 the bdb version-based application. Two processes running on two machines, a master who will be read/write db, one as a desire to only read backup db. It seems backup will sometimes get 'DB_EVENT_PANIC' event for reasons that I didn't. What should I do upon receipt of these events? Should the devil out and run it then open env again for recovery? A process can reopen the environment for recovery without exit first?

    After a panic you should exit all of your process, and then run a recovery. You can run the recovery using the db_recover or by performing a DB_ENV-> open() with the DB_RECOVER flag. Refer to the reference Guide of the 'Restore Procedures' section for more details.

    Another issue is not related to the above question: If use bdb ha (api base), can it be 3 process, termpol1 is neither master nor customer but simply write db, process2 is as master of rep that open the same env (just for ha, will not write db), process3 is the client that connects to the master to get synchronized db?

    For most applications of replication, the main environment and customer environment run on the different sites/machines. It is also possible to run the main environment and environment of the client on the same machine, but there are still distinct environments with separate home directories.

    All database entries should be made on the main environment. If your termpol1 needs to use the same environment as process2. Your process2 must run first, to set up and start the environment as a master of the replication. So your termpol1 can start and perform its writings. You can start your client/process3 anytime. Refer to the reference Guide section "Building replicated applications", in particular the paragraph starting with "take the case of several process...". ', for more information.

    Paula Bingham

    Oracle

  • Handles the Click event of the MessageTextInput in the ProcessFormRequest method

    Hi all

    my design is something like:

    There is a table that has a radio button in the first column and MessageTextInput in the second column.

    When the user clicks on a MessageTextInput of a particular line, option button in the first column of the same row must be verified automatically.


    Please notify.

    Thank you
    Yohanna

    Hello

    The event type is firePartialAction and not firePartialPage

    The radio button trigger this event and then enter it in controller processformrequest.

    Event string = pageContext.getParameter ("event");
    then
    take a transitional attribute of Boolean type and attach it to the readonly property of the textinput using SPEL.

    {oa. . }

    then after that you caught the event set the Boolean.FALSE attribute on the textinput.

    row.setAttribute ("", Boolean.FALSE);

    For more info see Page rendering partial Devguide.

    Thank you
    Gerard

  • How to handle the click event of the ButtonField?

    I've added six buttons in my application. I want to perform different actions dependent on which button is pressed.

    How I do that? Can someone explain to me please with code?

    Thanks in advance.

    You can use a FieldChangedListener.  When you press the button, it calls the function fieldChanged (...).  The first parameter is the area that has changed (i.e. button).

    Earl

  • How to handle the press event SHIFT key?

    Help me. Thank you!

    I solved the problem of my application in the other direction. Thanks BBDevelopers!

  • 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

  • OpenGL + MMR video playback and touch events.

    Hello BB forums natively,.

    We have an openGL application that renders the video using the window mmrenderer child. Surface OpenGL is transparent and makes some elements of overlay the video above. It seems that the touch events are only sent when it arrives on the non-transparent part of the surface of the OpenGL. Is there a way to catch all touch events in this scenario (perhaps of the child window)?

    Thank you!

    Ask yourself properly the events with "screen_request_events..." with the context of the correct screen?

    Did you look in the GoodCitizen OpenGL sample application? It shows how all the events are received and process across the entire screen with a very similar use case;

    Martin

  • Dialog.Alert give runtime exception

    Hi all

    I have a scenario, whiich am thrown in runtime exceptions.

    I placed a dialog.alert to show the user an alert after a validation. It works fine, but once when I cllicked on the ok button, it TR throwing a runtime exception. She did not understand why clicking on the alert of dialogue in which run-time exception.

    In some screens, he of not throwing the error and works very well.  I have observed that, the error is thrown in cases where a custom editfield is added to the screen.

    Please explain to me why this is happening and how to understand it. .?

    Thanks to everyone for your interest!

    After a long vacation... so this thread remains as it is. I found the mistake during debugging. There is no detailed msg that are associated with. and it is originally due to "TouchEventInjector" will be void. I haven't heard of him until now.

    I don't know yet why it start error.

    but I solved my problem by pushing an anti-pop as alert msg.  I wl mrk this thread as solved after awhile, looking for ideas about this error.

Maybe you are looking for