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
New Developer
Posts: 13
Registered: ‎09-20-2012
My Device: alph
My Carrier: n/a

Re: BB10: 404 Error when adding an event from native extension

Thanks for the reply once again, I've updated my SDKs and am currently having trouble loading the 09 OS onto my dev alpha, so hopefully I shall return once that's sorted!
New Developer
Posts: 13
Registered: ‎09-20-2012
My Device: alph
My Carrier: n/a

Re: BB10: 404 Error when adding an event from native extension

Hi again,

 

I've updated my webworks and native sdks and also the OS on my dev alpha.

I've pushed my code to a public github repo here: https://github.com/titch88/tcrpa-ext

 

Currently, including the add event line in index.htm ( blackberry.event.addEventListener("tcrpalogEvent", logCallback); ) causes the app to crash/hang at startup.

 

Is the correct debugger statement usage to insert the "debugger;" line in the js code and use web inspector to see when execution stops? If so, I can't seem to cause breaks beyond client.js.

Retired
Posts: 115
Registered: ‎06-06-2011
My Device: 9800
My Carrier: Rogers

Re: BB10: 404 Error when adding an event from native extension

do you want to send me a bar at nbhasin@rim.com and I can debug it here?
Can you set the debugger statement on each of the index.js and tcrpaEvents.js methods?

make sure its package the bar with -d.

I can try to debug it here.
@nukulb
New Contributor
Posts: 3
Registered: ‎07-11-2013
My Device: 9930
My Carrier: T-mobile

Re: BB10: 404 Error when adding an event from native extension

[ Edited ]

hi Nukul,

 

i got 404 (OK) when call webworks.event.add and webworks.event.remove

 

would you please review my code, thanks a lot

 

source code

 

Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: BB10: 404 Error when adding an event from native extension

Native is extremely hard to debug but a 404 is something I would never expect

 

Can you make sure the push is the latest so I have current code + I'll see what I can discover

 

Can you also descrive the desired / actual mismatch in detail

 

I really want a logging mechanism myself for Native so am more than happy to help




Click the like button if you find my posts useful!
New Contributor
Posts: 3
Registered: ‎07-11-2013
My Device: 9930
My Carrier: T-mobile

Re: BB10: 404 Error when adding an event from native extension

[ Edited ]

please see https://dl.dropboxusercontent.com/u/32413760/Screen%20Shot%202013-07-08%20at%2016.48.44.png
for an idea

maybe this is helpful for understanding the issue
when i register event by calling webworks.event.add

it post localhost/community.barcodescanner/add with return 404 (OK)

 

but the event did registered and works

Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: BB10: 404 Error when adding an event from native extension

As a contibutor myself I have sserious issues with events (check issues on GitHub)

 

The question is whether your ext needs events or callbacks

 

Events are not currently supported - I have raised this issue

 

If its callbacks they are

 

A tricky line is that while you can set an callback you can't at the moment do events - I have a lovely keyboard ext in my repo with full events - but its useless as avents never fire

 

I'll try your stuff a little later (out shopping) but the above explains why things may not go as we like

 

As mentioned eariler - ext is something for the code ninja




Click the like button if you find my posts useful!
New Contributor
Posts: 3
Registered: ‎07-11-2013
My Device: 9930
My Carrier: T-mobile

Re: BB10: 404 Error when adding an event from native extension

did you have a chance to review my code