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
Developer
Posts: 61
Registered: ‎06-01-2009
My Device: Not Specified

some problem when I develop the Blackberry Webwork program

There is some problem when I develop the Blackberry Webwork program.

 

1. When I click the hyper link to change the page, the system will total set to white screen when it is changing the page. Can I avoid that?

 

2. Is that the Blackberry widget support drag and drop function? How to implement it?

 

3. How the Blackberry widget detect if the machine is online or not?

 

4. How to detect the screen is vertical tilted or horizontal tilted?

Developer
Posts: 71
Registered: ‎02-04-2011
My Device: Blackberry Bold & Pearl
My Carrier: Telecom NZ

Re: some problem when I develop the Blackberry Webwork program

[ Edited ]

Hey Fenixlam,

 

I recommend you check out the tablet webcasts: http://webcast.streamlogics.com/audience/index.asp?eventid=49950807

 

They answer each of these questions and more as the webworks API is consistant across platforms, there is most likely BB webcasts as well. The only thing they don't mention is drag and drop. I haven't seen any native drag and drop functionality in the API - I decided to roll my own, but most people will be using javascript frameworks that have done this coding for you. Check out Jquery and google drag and drop jquery tutorials.

 

Good luck.

Developer
Posts: 386
Registered: ‎12-12-2010
My Device: BB Style
My Carrier: Sprint

Re: some problem when I develop the Blackberry Webwork program

 


 

2. Is that the Blackberry widget support drag and drop function? How to implement it?

 


I was able to use this workaround

 

http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript

 

in a webworks app that i wrote that has a drag-drop feature. And it works pretty good.

Developer
Posts: 61
Registered: ‎06-01-2009
My Device: Not Specified

Re: some problem when I develop the Blackberry Webwork program

I have try it 2 days and found that cannot work very accuracy because blackberry widget cannot detect "mouse up" function very accuracy, especially when the user  "draging" the object and release the mouse --- that is completely not work.

 

 

Developer
Posts: 71
Registered: ‎02-04-2011
My Device: Blackberry Bold & Pearl
My Carrier: Telecom NZ

Re: some problem when I develop the Blackberry Webwork program

Unless you are using the trackpad on the torch for the drag and drop functionality you should be looking at touch events rather than mouse events. For instance mouse move won't fire at all - why? Because there is no mouse. Mouse Down, up, and click events will only fire if there are no touch events - there may be some unreliability here.

 

Have a look at the:

touchstart

touchmove

touchend

 

events.

 

Highlighted
New Contributor
Posts: 5
Registered: ‎06-17-2011
My Device: Torch
My Carrier: o2

Re: some problem when I develop the Blackberry Webwork program

Did you ever fix 1) the white screen. 

 

I have this only on Torch devices and simulator. Really frustrating.