Get on touch event BB10 Simulator

IM studying BB10 Webworks. For exl I have this:











How can I get the event when I touch a div? It's ok when working with web by onclick but with Simulator, I do not know how to get the key events. Can someone help out me, tks so much

Here is an example page that allows to understand how touch events:

http://BlackBerry.github.IO/WebWorks-samples/kitchenSink/HTML/browser/touch.html

On the BlackBerry 10 Simulator, you should expect to see the TouchStart, TouchMove events and touchstart SHOOTING when you interact with the content of the page with the mouse (Note: will also fire the click event).  Make sure that you are listening and managing events of button correctly.

Tags: BlackBerry Developers

Similar Questions

  • BB10 Simulator on Vmware ESXi

    I'm trying to get the BB10 Simulator to work on a VMWare ESXi server. Here's what I've done so far:

    1. Installed the Simulator on yhe development machine, started VMWare workstation, open the vmx file and downloaded the VM on the ESXi server.
    2. Disabled 3D acceleration on the machine virtual (on ESX) and selected 'Full touch safe mode' after starting the virtual machine.

    At this point, the virtual computer screen displays the IP 'telnet ftp ssh qconn', the axis of the device and the build number.

    The next step is to connect the Momentics IDE to this virtual machine.

    The Simulator is in need of a vmx file configuration dialog box (likely to run vmware specific commands). In the configuration of ESXi, there is no vmx file.

    If I try to connect to the virtual machine by IP address, I need a device password, I did not.

    Someone at - it suggestions on what do I do now?

    In response to my own question because I found the answer:

    Now that I have the IP address, I just follow the steps described in

    http://supportforums.BlackBerry.com/T5/native-development/BB10-native-Cascades-SDK-not-connecting-to...

    Because I had never set up a password for the Simulator, I left the empty password field.

    Copy-paste the details:

    Of your IDE

    -Right click on your project in the Project Explorer

    -Go to Blackberry tools and click on configure target...

    -Click Add new target it... button and enter the IP address of your Simulator in the host name or IP address field, enter your password if you have one then click on finish

    To run your application on the Simulator:

    -In the Project Explorer view, double click on file bar - descriptor.xml, then click on chip Debug Set button to set the author of the application information.

    -Set the configuration of the correct version for the Simulator first by right-clicking on your project and selecting Configurations of Build > Set Active > 4 Simulator-Debug.

    -In the Project Explorer view, right-click the project and select build project.

    -Right click on the project again, and then select run as > BlackBerry Application C/C++.

  • GoodCitizen example Orientation events in Simulator v1

    good, someone at - it actually get GoodCitizen to work with landscape/portrait changes in the Simulator?

    first of all, I had to add 'true'.

    at the helm - descriptor.xml to get even the events of the direction received by the app.

    not a promising start for an application 'example '.

    If you start the app in landscape mode, then perform an angular upsweep of the lower right

    It rotates, but creates a small greyish window on the bottom of the screen and you do not

    See the cube rotating.

    If you re-coup from lower right, that he returned to landscape mode and things/cube work once again.

    If you start the application in portrait mode, the screen is totally black, no small greyish window even.

    a blow to turn you receives in a mode of work beautiful landscape.

    I put a fprintf (stderr, "surface_width = %d, height=%d\n"...)

    in the function resize() and regardless of orientation you * always * get a surface width

    of 1024 and a height of 600. It seems wrong to.

    Thus, anyone actually get this GoodCitizen be good with orientation in the simulator of the v1?

    Good afternoon dnp.

    A few notes on your desktop.

    1. you seem to have a fairly old version of things. Please go to this URL and download the latest SDK and Simulator

    https://bdsc.webapps.BlackBerry.com/native/download/

    Your Simulator should be 2.0.0.7971 (BlackBerryPlayBookSimulator-Installer-2.0.0-7971-Win-201202221232.exe) and SDk should be thus 7971 (installer-bbndk-2.0.0-win32-7971-201202171813-201202181253.exe installer).

    2. I suppose that you created a GoodCitizen project in the IDE. I ran a quick test like myself and noticed that bar - descriptor.xml has no parameters of a good when a project is created through FDI or downloaded here:

    https://bdsc.webapps.BlackBerry.com/native/sampleapps

    Yes, thank you very much for this bring to my attention. I contacted the team that is responsible for the maintenance of these places and they will be resolved short of time.

    For later use, there are a github repo that has all the native samples. It has all flags necessary bar-descriptor (that this plug in Board is maintained by authors of the actual sample)

    https://github.com/BlackBerry/NDK-samples/tree/master/GoodCitizen

    For example, to quickly sum things - update your sdk and Simulator, get the GoodCitizen correct out of the github and things will work. Meanwhile, let's fix the IDE samples and devportal.

    And let me know if you have problems with this.

  • BB10 Simulator on Mac hangs just at startup - Parallels 7

    The BB10 Simulator works on Parallels 7?

    I was able to get the things installed but when I run it it crashes. Any suggestions?

    Thank you

    This is not a tested configuration.  The Simulator can run in native mode in VMWare Player on Mac, so you should use Parallels.

  • 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

  • Question touch event for mutil - Manager on a screen

    Hi all

    I will say the case:

    I have a screen there is a main VerticaFieldManager that holds two VerticalFieldManager and a field

    the two children-VerticalFieldManagers hold some LabelField.

    When one of them is selected, it will be lit high.

    Then, extending from screen and override touchEvent() and shows a "Hit" said dialog and highlight the OK field.

    because the touchEvent is a shipped process, where the touchEvent occur, each field will receive this event.it never check what field is developed and send the event in this area, (if I'm wrong, please advice).

    Here's the question.

    When user getX and getY to get point touch, then the user getFieldAtLocation on crib, if X / is greater that the extensions Manager, RIM API returns the field expanded.

    This does not look good.

    Here is my source code:

    /*
     * VFMTester.java
     *
     * © , 2003-2008
     * Confidential and proprietary.
     */
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.servicebook.*;
    import net.rim.device.api.ui.container.*;
    
    /**
     *
     */
    public class VFMTester extends UiApplication{
        public static void main(String args[]){
            UiApplication app = new VFMTester();
            app.enterEventDispatcher();
        }
        VFMTester() {
            pushScreen(new AScreen());
        }
    
        class AScreen extends MainScreen
        {
            VerticalFieldManager vfm;
            public AScreen()
            {
                super();
                vfm = new VerticalFieldManager();
                vfm.add(new LabelField("Test",Field.FOCUSABLE));
                VerticalFieldManager v1 = new TouchVerticalFieldMananger1();
                for(int i=0;i<10;i++){
                    v1.add(new LabelField("F" + String.valueOf(i+1),Field.FOCUSABLE));
                }
                VerticalFieldManager v2 = new TouchVerticalFieldMananger2();
                for(int i=0;i<10;i++){
                    v2.add(new LabelField("S" + String.valueOf(i+1),Field.FOCUSABLE));
                }
                vfm.add(v1);
                vfm.add(v2);
                this.add(vfm);
            }
            public boolean trackwheelClick(int time, int status){
                Dialog.alert("click");
                return true;
            }
            protected boolean touchEvent(TouchEvent te){
                UiApplication.getUiApplication().invokeLater(new Runnable()
                {
                    public void run()
                    {
                        Dialog.alert("touched!");
                    }
                });
                return super.touchEvent(te);
            }
        }
    
        class TouchVerticalFieldMananger1 extends VerticalFieldManager
        {
            TouchVerticalFieldMananger1()
            {
                super();
            }
            public boolean touchEvent(TouchEvent te)
            {        if(!this.isFocus()) return true;            switch(te.getEvent())
                {
                    case TouchEvent.CANCEL:
                        System.out.println("CANCEL");
                    break;
                    case TouchEvent.CLICK:
                        System.out.println("CLICK");
                    break;
                    case TouchEvent.DOWN:
                        System.out.println("DOWN");
                    break;
                    case TouchEvent.GESTURE:
                        System.out.println("GESTURE");
                    break;
                    case TouchEvent.MOVE:
                        System.out.println("MOVE");
                    break;
                    case TouchEvent.UNCLICK:
                        System.out.println("UNCLICK");
                    break;
                    case TouchEvent.UP:
                        System.out.println("UP");
                    break;
                }
                if(!te.isValid()) return true;
                int x = te.getX(1);
                int y = te.getY(1);
                int index = this.getFieldAtLocation(x,y);
                if(index < 0 ) return true;
                Field f = getField(index);
                f.setFocus();
                this.invalidate();
                return true;
            }
        }
        class TouchVerticalFieldMananger2 extends VerticalFieldManager
        {
            TouchVerticalFieldMananger2()
            {
                super();
            }
            public boolean touchEvent(TouchEvent te)
            {
    
                if(!this.isFocus()) return true;            switch(te.getEvent())
                {
                    case TouchEvent.CANCEL:
                        System.out.println("CANCEL");
                    break;
                    case TouchEvent.CLICK:
                        System.out.println("CLICK");
                    break;
                    case TouchEvent.DOWN:
                        System.out.println("DOWN");
                    break;
                    case TouchEvent.GESTURE:
                        System.out.println("GESTURE");
                    break;
                    case TouchEvent.MOVE:
                        System.out.println("MOVE");
                    break;
                    case TouchEvent.UNCLICK:
                        System.out.println("UNCLICK");
                    break;
                    case TouchEvent.UP:
                        System.out.println("UP");
                    break;
                }
                if(!te.isValid()) return true;
                int x = te.getX(1);
                int y = te.getY(1);
                int index = this.getFieldAtLocation(x,y);
                if(index < 0 ) return true;
                Field f = getField(index);
                f.setFocus();
                this.invalidate();
                return true;
            }
        }
    }
    

    1:

    If the user has first select a field on one of them VerticalFieldManager, it will always be there and cannot be changed to the other domain.

    2:

    even if I check the field has focus or not, but it doesn't work anymore.

    Is there something wrong on my source code? or logical is false, or my understanding is wrong?

    Any advice pls.

    Thank you.

    We see this issue as well. Our workaround for this is to check the coordinates x, y of touch to make sure that they are within the scope of the current field, and then re - delegate the event so if x is outside the scope of the field.

  • AddEventListener Webworks Javascript PlayBook for mouse/touch events

    I am writing an app for the Playbook using Webworks BB. Inside the application, I have a few items 'div' that users can grab and move them. I implemented it and tested on the desktop browser and it works very well. But I have a few questions about the Playbook:

    For some reason I'm not able to get the mouse/touch events... Here is a small code snippet:

    ....

    ....

    OK trouvé un woraround à ce problème en utilisant : http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript

  • Touch event of overlay question

    For our articles, we use an overlay to simulate a background image with "background-attachment: fixed" property css on mobile devices. This overlay 'pointer-events' set to none, then it does not interact with touch events.

    However scrolling is barely on the DPS Android app. It scrolls only in small steps. It works fine when loading the article Chrome (Android).

    There is also no question about the IOS version of the DPS app.

    Here is an example article reproduce the problem:

    Dropbox - Overlay_Issue.zip

    Any idea what's going on?

    Hello Sander,

    Thanks for sharing a nice, clean, the HTML file that reproduces the issue. I get the question on my camera as well. I logged a bug against the Android Viewer to investigate on what is happening.

    Neil

  • I have iphone 4s, icloud locked trying to get in touch with the owner to give it back or unlock it he won't talk, it's gsx is useful in this case? owner is not interested in the phone!

    I have iphone 4s, icloud locked trying to get in touch with the owner to give it back or unlock it he won't talk, it's gsx is useful in this case? owner is not interested in the phone! and he has been blocked me on whatsapp about 6 times when I tried to get in touch with 6 different number what can I do I login apple, name and telephone number of the owners, in the name of the country

    anyone here to help me? am ready to give her phone or money for if it unlock the phone

    * someone sell me the phone on class based internet site

    Thank you

    It's between you and him, Apple won't help you. So if he wants too that the phone doesn't help you, I advise you to stop bothering him, it's a little cheesy, don't you think?

  • Buy an iPod, reset it and knew I had to turn off find my iPhone. I have no way to get in touch with the owner login Apple ID account their child to do such, both parties assumed reseting it would be all that was necessary.

    As said, I recently bought a used iPod from the original owner, they had gotten their child a new iPhone and is more used to the iPod. When asked, they told everything what I need to do is to reset the iPod when I got home. Got home and went about resetting it, but when you attempt to set it upward and connect to iTunes, it says that I need their last ID. Apple I'm not able to get in touch with the original owner, I didn't to get any contact since I wasn't worried for their need (had taken as them all I would need to do is to put) to nine).

    Is it possible to fix this? I realized this is cause I have to disable find it my iPhone thing, I did not know was even a thing or would have done so before resetting the iPhone.

    Thank you for anyone who is able to help!

    I'm sorry.

    The iPod is useless until / unless previous owner deletes their iCloud account.

  • How to get to an event raised to a ring of text re-selecting value curretly selected?

    Hello. I have a ring of text I need to get a triggered event when any text (value) is selected. Now I have a value change event and it works well when choosing a form of different value, current, but what I need is the same event triggered even though I select the same text (value) that has been previously selected. I can't use the mouse resting on the same command, event because it fires the event before any text (value) is selected.

    If I create a property node (raise the event of Val (Sgnl)) I can "at a distance", and in this case the value change event for the ring of text will trigger even if I write the same value for the property node (Val (Sgnl)) several times. It's actually the behavior that I would have by clicking on one of the values of the ring of text with the mouse.

    Any ideas on how to solve this problem?

    Just have a look: it's a very simple way to do what you need to...

  • How can I get my combat microsoft game simulator 2 to flight load in full screen

    original title: Flight Simulator
    How can I get my combat microsoft game simulator 2 to flight load in full screen? He did so automatically for 5 years but now does not work. right click on icon drop-down ox b has size options, but doesn't let me change the size.

    Just to let you know, it seems that the forum you posted this (the answers from Microsoft Site Feedback Forum) is not the most relevant to post to. I would recommend this announcement on the forum of Windows (like about Windows: Gaming).

    I would recomment http://www.flightsimulationforums.com/index1.htm

  • How am I supposed to get help from microsoft when someone hacked my account? I've done everything asked, and nobody gets in touch. I'm losing business from day to day.

    How am I supposed to get help from microsoft when someone hacked my account?  I've done everything asked, and nobody gets in touch. I'm losing business from day to day.
    I've now set up a separate hotmail address so that I can write on this forum. It's a joke. I have tried for days to resolve this. Microsoft... one of the best companies in the world... poor quality more like...
    make money then I lose business... I am a small business as it is.

    I NEED HELP TO RETRIEVE MY PREVIOUS ADDRESS EMAIL PLEASE PLEASE PLEASE PLEASE PLEASE.

    Hi kate louisecox,.

    I understand your frustration.  In the search for your question, you got to see this article?  It examines a compromised account:

    http://www.windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41

    Also, if this does not help your situation, I would say that post future questions about this issue in the Windows Live Solution Center Forums as they would be able to help you:

    http://www.windowslivehelp.com/forums.aspx?ForumID=b782602b-8e7c-40D8-a66b-b44824497a17

    Like a record, these are public forums, so not everyone who responds is an employee of Microsoft.

    Thank you for using Microsoft Answers!

  • I uninstalled the touchsmart from hp on vista and then tried the system restore, dad will kill me, how can I get the touch screen to work again?

    I uninstalled the touchsmart from hp on vista and then tried the system restore, dad will kill me, how can I get the touch screen to work again?

    Hello

    You have a specific question for HP, it may be better if you ask in the Forums of HP's Support.

    http://h30434.www3.HP.com/

    See you soon.

  • My hard drive crashed and I can't get in touch with Microsoft because they want a product id and the number I have is not working. Help!

    I've had my laptop for several years and a week ago, the hard drive crashed. So, although I had all my photos and movies and other saved, I lost Vista. This wouldn't be a problem if I could find the disks that came with the computer at the beginning, but I've moved several times in recent years (college) and I can't find them. Anyway, I'm now trying to get in touch with Microsoft to get a new drive, but they won't talk to you unless you can provide a product key.

    There is a product key on the back of my laptop, but their system apparently doesn't like it and so they're going to make me pay $ 50 just to send someone. Someone knows how to bypass the product key thing, so I can get a customer support?

    Thank you
    Chandra

    Hello

    as vista came preinstalled Microsoft do not offer FREE support for this issue of yours. That is why the price of $50.

    and they ask for a product ID, not a product key that you mentioned; but who has the same result; no free support

    Product ID is completely different from the product key

    your support is the manufacturer of your laptop; but feel free to ask questions on these Forums

    to reinstall vista:

    Contact the manufacturer of the laptop computer and ask them to send you to vista recovery disks to reinstall the operating system back as it was when you bought it

    they do it for a nominal cost of $

    or borrow a vista microsoft dvd; not a HP, Acer recovery disk etc

    Make sure that you borrow the correct 32-bit or 64-bit microsoft dvd to your computer

    they contain all versions of vista

    This is the product key that determines which version of vista is installed

    http://www.theeldergeek.com/Vista/vista_clean_installation.html

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

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

Maybe you are looking for

  • Pokémon go

    When I downloaded Pokemon pass Pokemon icon appeared on my screen, but when I click it, it shows the name of Niantic company only and does nothing else. My iPad 2 has been upgraded to version 8.4.1 so the application should work I think. I need to ch

  • Portege R500 - overheating?

    Hello Recently one of my colleagues has experienced problems with its Portégé R500 laptop. The display becomes either black with white text (but the image is cut and very blippy) or the screen goes black in general. The laptop is very warm to the tou

  • Recovery of the factory from 32 bit to 64 bit with the note system performance

    Recovery of the factory from 32 bit to 64 bit with the note forever system performance, it's about associated wirehttp://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=50433which is closed/locked, and had no correct answer. I just bo

  • Doesn't let me change the Cpu fan!

    Hey guys,. My cpu hp craped out fan and I tried to buy another fan I removed the old an and replace now the new fan will only work 830 RPM compared to the former which took place in 1800 as soon as the computer I tired about three different fans, it

  • HP Pavilion x 360 Convertible: the Intel HD graphics driver update fails to install

    Hello I got my new laptop for Christmas and a few days ago, HP support assistant told me that there was a Version "Intel high definition (HD) Graphics Driver Update": 10.18.15.4281Ep3. I downloaded the updated, but after that 4 attempts trying to ins