Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
New Contributor
Posts: 9
Registered: ‎08-15-2012
My Device: Bold 9900
My Carrier: Etisalat
Accepted Solution

TypeError: Result of expression 'new blackberry.invoke' [undefined] is not an object. In bbUI application

I am facing an error when using blackberry.invoke feature and blackberry,invoke.BrowserArguments

 

I have a group of items in an imageList an item is defined like this line

 

<div data-bb-type="item" onclick="openUptownCairoLink()" data-bb-img="" data-bb-title="Uptown Cairo">Minutes from Anywhere</div>

 

function openUptownCairoLink() {

try{

        var args = new blackberry.invoke.BrowserArguments('http://blackberry.com');

 blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);

  }catch(e){ alert(e) }

}

 

and when I click the item it alerts the error as in the subject of this topic.

 

I am using BB Bold 9900 with OS 7

 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: TypeError: Result of expression 'new blackberry.invoke' [undefined] is not an object. In bbUI application

Can you post up your config.xml file... can you also specify the domain that this content is loaded into?

 

i.e. is this a local page in the appliation? or is it brought in from a different domain?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 9
Registered: ‎08-15-2012
My Device: Bold 9900
My Carrier: Etisalat

Re: TypeError: Result of expression 'new blackberry.invoke' [undefined] is not an object. In bbUI application

<widget xmlns:rim="http://www.blackberry.com/ns/widgets" version="0.9.1.1" rim:header="RIM-Widget:rim/widget" xmlns="http://www.w3.org/ns/widgets">

  <rim:navigation mode="focus" />

  <name>Emaar</name>

  <description>Emaar Misr Privilege Program</description>

  <author>Swipe 'n Tap</author>

  

  <access subdomains="true" uri="*" />

  

  <rim:cache disableAllCache="true"/>

  

   <icon rim:hover="false" src="images/icon.png" />

   <icon rim:hover="true" src="images/icon.png" />

    

    

    

    <rim:loadingScreen backgroundColor="#CFCFCF"

        backgroundImage="images/Splash.jpg"

        onFirstLaunch="true">

        <rim:transitionEffect type="fadeOut" />

    </rim:loadingScreen>

 

  <content src="http://192.168.0.140:8888/Emaar/www/index.htm" />

  <feature id="blackberry.push" />

  <feature id="blackberry.ui.menu" />

  <feature id="blackberry.ui.dialog"/>

  <feature id="blackberry.identity" />

  <feature id="blackberry.system.event" />

  <feature id="blackberry.app" />

  <feature id="blackberry.invoke.BrowserArguments" />

  <feature id="blackberry.invoke.PhoneArguments" />

  <feature id="blackberry.invoke" />

  <feature id="blackberry.app.event"/>

</widget>

 

 

Here is my config.xml file and I am loading the index.htm from external domain so that the development could be faster instead of each time blackberry reloads itself when a new version is installed.

 

So if that is the problem how can I enable the same features for the external domain ? 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: TypeError: Result of expression 'new blackberry.invoke' [undefined] is not an object. In bbUI application

You will want to do the following:

 

<access uri="http://192.168.0.140:8888" subdomains="true">
  <feature id="blackberry.push" />
  <feature id="blackberry.ui.menu" />
  <feature id="blackberry.ui.dialog"/>
  <feature id="blackberry.identity" />
  <feature id="blackberry.system.event" />
  <feature id="blackberry.app" />
  <feature id="blackberry.invoke.BrowserArguments" />
  <feature id="blackberry.invoke.PhoneArguments" />
  <feature id="blackberry.invoke" />
  <feature id="blackberry.app.event"/>
</access>

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter