ReferenceError: Can't find variable: blackberry

When I try to run this code:

blackberry.pim.contacts.find(contactFields, null, onFindSuccess, onFindError);

on the device, I got error in Web Inspector:

ReferenceError: Can't find variable: blackberry

Could someone help me?

Thanks in advance

Feel free to use our reference samples to.  Here's how to add the event listener to my samples:

https://github.com/BlackBerry/BB10-WebWorks-samples/BLOB/master/accelerometer-fight/index.html#L41-L...

But yes, you are either without waiting for the webworks ready event before calling a blackberry API, or you are not including the webworks sdk correctly in your application.  You can see an example of this as well, here: https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/Accelerometer-Fight/index.html#L33

Tags: BlackBerry Developers

Similar Questions

  • .. . QML:141: ReferenceError: can't find variable: cppObject

    Hello

    I'm getting a

    ReferenceError: can't find variable: cppObject

    in the following code, if I run the formatCurrency even the raised any event works fine.,.

    I am trying to format a monetary value of float before presenting it to the screen,

    ListView {
                    id: searchListView
                    dataModel: searchDataModel
                    listItemComponents: [
                        ListItemComponent {
                            type: ""
                            SearchResultsListItem {
                                title: ListItemData.Title
                                pubPrice: cppObject.formatCurrency( parseFloat(ListItemData.Price) )
                            }
                        }
                    ]
    ........
    

    Hello

    ListItemComponents have different context. Something like this should work:

    ListView {
                    function getCppObject() {
                      return cppObject
                    }
                    id: searchListView
                    dataModel: searchDataModel
                    listItemComponents: [
                        ListItemComponent {
                            type: ""
                            SearchResultsListItem {
                                title: ListItemData.Title
                                pubPrice: ListItem.view.getCppObject().formatCurrency( parseFloat(ListItemData.Price) )
                            }
                        }
                    ]
    ........
    
  • ReferenceError is not found variable blackberry BB10

    This is my code and its does not work I have refenceerror is not variable

    my config.xml file

    
            read_device_identifying_information
            access_internet
        
        
    
        
          
        
    
          
    
        
    
        
        
        
      
    

    ////////////////////////////////////////////////////////////////////////////////////EDIT//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    I went through this issue but did not help.

    Any help is appreciated

    Thanks in advance.

    Are you sure that you listen for the webworksready event before calling blackberry.event.addEventListener?

  • Can't find variable: webworks (sensors)

    It's weird... It does not hurt anything--it just bothers me

    My application running on a Z10 with active Web Inspector, I get an error repeated (many times) connected at startup - then WebWorksReady comes in and they stop

    Looking at debugging they refer to webworks.event.trigger ('devicecompass'...

    The compass works very well and it's initialization is wrapped in a function called after loading webworks

    I wonder if the sensors feature load something before that WW is ready?

    Comes to Dev Alpha C with 10.1.0.1485 as well, but not so many errors (slower device? Beta OS?)

    This is a minor bug that my colleague, Anzor, recently found too.

    We intend to submit a question, but we invite you to make on the public issue tracker and we will worsen internally.

    As far as I can see, you do not get the error messages thrown unless you do a CTRL + r in the WebInspector. We believe that it is because the listeners are not detached, or do not remove only not soon enough, when you perform this update.

  • BlackBerry Smartphones where can I find the "Blackberry desktop software? .....

    ... I have Verizon wireless and it is not on one of the disks I got with the phone.  I know it is available online to download, but before downloading, I get a message stating "Note:

    If you did not purchase BlackBerry directly from Research In Motion (RIM), please contact your service provider to determine if this software has been authorized for use with your handheld. "I contacted Verizon, and they do not seem to know, either.  Any help is appreciated.

    http://vzw.SmithMicro.com/BlackBerry/ try this link, it takes you directly to the link on the blackberry on verzion Software.  If you look to the left in the list, it will show you the desktop option

    Hope this helps

  • If anyone has had this error code: MuseJSAssert: error by calling the selection function: reference error: can't find variable: WebPro

    I did not bring any changes, but this error has just begun. The next screen shows some files on the server may be missing or incorrect. Clear the cache of the browser, and then try again. If the problem persists, please contact the author of the Web site. The accommodation is with Business Catalyst.

    Hello

    Please check this post for a similar description: some files on the server may be missing or incorrect

    Kind regards

    Aish

  • Blackberry10 pushwoosh - is not variable: blackberry

    I'm also looking for a solution to this.

    I implemented the plugin pushwoosh on Android and iOS, but the blackberry10 seems to be quite a struggle.

    I followed this link instruction and I had constantly:

    ReferenceError: Can't find variable: blackberry
    

    I realized then that I had to install some plugins... I've added:

    • com BlackBerry.app
    • identity
    • invoke
    • JPPS
    • push
    • System
    • UI. ContextMenu
    • UI. Dialog
    • utils

    Here the variable blackberry was present at that time and also the method push but not openBISPushListener. Then, I get:

    TypeError: 'undefined' is not a function (evaluating 'blackberry.push.openBISPushListener(ops, onData, onRegister, onSimChange)')
    

    When I console.log (blackberry); I have only PushPayload and PushService pressure.

    INFO:

    • Cordova 3.1.0
    • tested on blackberry Z10 device
    • 10.0.10.261 OS version

    Any help is welcome.

    Thank you!

    The API you are referring is a BlackBerry OS (i.e. 5.0 to 7.1) application. From what I understand, PushWoosh is also intended for BBOs.

    The APIs themselves have changed for BB10 and openBISPushListener is no longer used. You can find documentation BB10 here:
    http://developer.BlackBerry.com/HTML5/APIs/BlackBerry.push.pushservice.html#.create

    To implement the push on BB10, you use the WebWorks APIs directly at this time.

  • CustomComponent Cant find variable

    hand. QML

    ...
    
    listItemComponents: [
                            ListItemComponent {
                                type: "item"
                                CustomComponent {
    
                                }
                            }
                        ]
    
    ...
    

    CustomComponent.qml

    import bb.cascades 1.0
    
    Container {
        Button {
            text: "Custom Container"
            onClicked: {
                _app.showMessage("This is a test")
            }
        }
    }
    

    already, add this in main.cpp

    qml->setContextProperty("_app", this);
    

    I get an error

    asset:///CustomComponent.qml:7: ReferenceError: Can't find variable: _app
    

    is this a bug or the context property can not be access on listitemcomponent?

    Well, you can hang you want global variable of Qt . You can try something like this:

    hand. QML

    Page {
       Container {
          ListView {
             listItemComponents: [
                ListItemComponent {
                   type: "item"
                   CustomComponent {
                   }
                }
             ]
          }
       }
       onCreationCompleted: {
          Qt.app = _app;
       }
    }
    

    CustomComponent.qml

     

    import bb.cascades 1.0
    
    Container {
        Button {
            text: "Custom Container"
            onClicked: {
                Qt.app.showMessage("This is a test")
            }
        }
    }
    

    anditsung wrote:
    Yes, I already tested it before. If I'm adding my other than his work listitem customcontainer.

    Another way to access?

  • BlackBerry smartphones can not find my Podcast application 'installed '!

    I recently updated my operating system to the most recent (I have a curve 8900)

    All my apps seem to have survived, but I can't find the BlackBerry Podcast app, which is the one I use more! BB App World, 'my world' shows that this only "installed", but it is not FOUND. I can't even download it again, because when I go to App World, it shows no 'download' option.

    Help! Any advice?

    Thank you!!

    Cariteacher

    The mine is located in my media folder, but you probably already checked there, right?

    If you don't find it there, go to your downloaded applications (the OS 6, it is Options > device > application management, OS 5 options > Applications).  Once you find it, select it and click on the BB menu key.  Select Delete, and then return to AppWorld and download again.

    Let us know if that does the trick.

  • Installed software blackBerry desktop software and can not find the link

    I downloaded and installed the latest version of the desktop software. Link opens automatically when I plugged my BB. Cannot find software to run the exe. Mix is there but not link. When I try to reinstall, I like that it is already there. Where can I find?

    If you are looking to C:\Program Files (x 86) \Research In Motion\BlackBerry Link, is Link.exe BlackBerry?

  • I want to develop an application Live TV for BlackBerry PlayBook. Please guide where can I find the specifications such as width, height, and icon sizes and design factors etc.

    I want to develop an application Live TV for BlackBerry PlayBook. Please guide where can I find the specifications such as width, height, and icon sizes and design factors etc.

    Guideleines of the user and the specifications on the sizes of icons etc to BlackBerry PlayBook OS Applications

    OK, I downloaed the pdf below for UI guiderlines

    UI_Guidelines_BlackBerry_PlayBook_Tablet_2_1.PDF

    Ok

  • BlackBerry Smartphones why can't find a contact in my contact list?

    Hi, here is my problem.

    I'm going to remove a friend from my contacts list, because it keeps spreading a message like 12 times a day. But the thing is, I did not find in the list of contacts!

    I typed his name in the search box. I even scroll down to verify that my contacts one by one, but I still can't find him.

    How is that possible? Is there another way to delete a contact? Help, please!

    Ok. Here's what I would try...

    If you use a legacy BBOS model, remove the battery from the power, wait 30 seconds, put the battery back and try again. If you use a model BB10, try a soft reset first. There are two ways to do a soft reset and if the first doesn't work try the other method. If the soft reset does not work, and if you have a removable battery, then remove the battery for a few minutes and then try again.

    See http://www.blackberry.com/btsc/KB02141 on methods to reset a BlackBerry. Do that and then we'll see what we see.

  • BlackBerry software where can I find the latest version of the software for PC Blend?

    I've updated the app mixes on my passport and now it does not connect to my PC.  It says that I have to update the software on the computer, but when I go to http://ca.blackberry.com/software/desktop/blackberry-blend.html# and click on download Blackberry mixture for PC, it takes me to a download for this version.  When I try to install it it say that everything is up to date.

    Download v1.0.0.74 BlackBerry Desktop Software install 10 (Windows OS)

    Date of publication: 02/12/2014

    This obviously isn't the correct version because it has been updated on December 17, but I can't find a link to something more recent.  Can someone get me a link to the latest version?

    Thank you

    The latest mix of office software that I see is this:

    Download details
    Software name: 10 BlackBerry Desktop Software install v1.1.0.21 (Windows OS)
    Name of the file: BlackBerryDesktopSoftware1_1_b29.exe
    Download size: 153 MB
    Date of publication: 17/12/2014

    Link here: https://swdownloads.blackberry.com/Downloads/contactFormPreload.do?code=A8BAA56554F96369AB93E4F3BB06...

  • BlackBerry Smartphones how can I find my Bluetooth passcode?

    How can I find my Bluetooth passcode?

    That's what I found...

    If the Bluetooth device does not have a keyboard (for example, a wireless headset), on your BlackBerry device, type the pairing passkey that appears on the compatible Bluetooth device or which is provided in the documentation that came with the Bluetooth compatible device. The password is usually a numeric or alphanumeric code.

    or

    If the active Bluetooth device has a keyboard (for example, a laptop computer), enter a matching password of your choice on both devices.

    http://docs.BlackBerry.com/en/smartphone_users/deliverables/18577/Pair_with_a_Bluetooth_enabled_devi...

  • BlackBerry smartphones, I can't find world app on my blackberry torch can anyone help?

    I havnt been able to do the updates that I can't find the icon for app world, my daughter seems to think that I've hidden it! but we can't find, wondering if someone could help? Thank you

    First check, open the main menu, press the menu key and select just check "Display all icons" if she is not there. Otherwise, go to your BlackBerry browser and go to http://mobile.blackberry.com and select "Visit BlackBerry App World" here to try to make a download of the app, it should redirect you to the application on the phone. It can perform an update of BlackBerry World with your BlackBerry ID

Maybe you are looking for

  • I can turn all of these stupid iMessage effects off?  I'm not a 12 year old girl.

    It's gotta be the dumbest thing for people who use the phone in a professional environment.  Allow me the option to disable all these stupid things on my end. Jeez

  • FYA 'Zero door more' help (0 +) for Belarus

    We are testing iOS 10 in Belarus and have had the same problem, as there is one year with the official release of iOS 9. For example, I want you type a number into Phone.app as + 375296010203 I am the owner of "0" for +, but rather '+' I see "0 +". B

  • OVERVIEW OF USB RESOURCE NAME

    Read many of the posts CIHI and manged to get the "COM25' to display when I select the VISA window COM port. However, VISA Interactive Control Window displays the following detailed description of the same port: "ASRL25 (COM25 - microstrain virtual C

  • Fable PC

    I just purchased Fable PC newegg.com and when I try to install it.  It says the cd key provided with the game is invalid.  I have tried typing the key in 4 x and have had 2 other thus trying to people.  No luck so far.  Any suggestions?

  • I want to upgrade my OS to widows 2007

    I want to upgrade my OS to widows 2007 but I have a 896 ram memory is available or not? NEED TO UPDATE MY RAM OR HE DIDN'T THERE HAS OTHER SOLUTIONS.