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

Reply
Contributor
Posts: 40
Registered: ‎05-12-2012
My Device: 9800
My Carrier: Virgin mobile

Focus not in blackberry object what am I missing

I keep getting errors in Ripple stating

 

blackberry.focus.setFocus is an undefined property of blackberry. I did a console log of the black berry object and it is indeed not there. I have the following.

 

app: Object

 events: Object

 get network: function (){return e.call("blackberry/system/network")}

invoke: Object

io: Object

message: Object

 phone: Object

set network: undefined

system: Object

transport: Object

ui: Object

 

__proto__: Object

 

Note no focus.

 

My config file is here - What am i missing? - do I need <feature id = "blackberry.focus"> None of the docs say I need this. infact they infur it is in <feature id="blackberry.ui.dialog" /> But I am having lots of problems with navigation and feel there is something I am missing. Any help much appreciaqted

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" 
   xmlns:rim="http://www.blackberry.com/ns/widgets" 

   version="1.0.0.400" rim:header="xxxxxxxxx">

   <name>xxxxxx</name>
   <description>xxxxxxxxxxx.</description>
   <content src="index.html"/>
   <access uri="*" subdomains="true"/>
   <rim:navigation mode="focus" />
   <feature id="blackberry.app" required="true" version="1.0.0.0"/>
   <feature id="blackberry.system.event"/>
   <feature id="blackberry.ui.dialog" />
   <feature id="blackberry.ui.menu" required="true" version="1.0.0.0" />
   <feature id="blackberry.invoke" /> 
   <feature id="blackberry.invoke.MessageArguments" /> 
   <feature id="blackberry.message" /> 
</widget>
Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Focus not in blackberry object what am I missing

Which platform are you setup for in Ripple? The Focus API is only on the Java Smartphone, not the PlayBook or BlackBerry 10.

Tim Windsor
Open Source Technical Lead
Contributor
Posts: 40
Registered: ‎05-12-2012
My Device: 9800
My Carrier: Virgin mobile

Re: Focus not in blackberry object what am I missing

It is set up for developing for smartphone using webworks 2.3.1

 

I get the errors in ripple.

 

But when I put onto the simulator it crashes every time it hits a x-blackberry-onUp or x-blackberry-onDown without even calling the code (or even executing an inline script). So there it does not even get as far as my blackberry.focus.setFocus(id)

 

Something definately wrong with my config. I have tried uninstalling and re-insatlling everything but nothing seems to fix the issue.

 

I guess the fact that blackberry.focus does not exist in the blackberry object says it all.

 

Contributor
Posts: 40
Registered: ‎05-12-2012
My Device: 9800
My Carrier: Virgin mobile

Re: Focus not in blackberry object what am I missing

This really has become super urgent. It is preventing me from going into QA and client is getting conerned. If anybody could spare some time on this I really would appreciate it.

Highlighted
Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Focus not in blackberry object what am I missing

Can you attach a sample project that we can test with?

 

Have you tried getting a newer simulator to test on, or trying on a real device with latest software?

Tim Windsor
Open Source Technical Lead