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

Java Development

Reply
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Dialog creating RunntimeException on OS5

Like you I find it difficult to believe that there is a problem with a straight Dialog.  So can you create a simple, one screen example, with a Dialog in it, that shows the problem?  Then we can look at it and test it ourselves. 

New Developer
Posts: 53
Registered: ‎06-07-2011
My Device: 9800 torch
My Carrier: o2

Re: Dialog creating RunntimeException on OS5

attached is a class that does it. Happens on both buttons, just i didnt notice it before

Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Dialog creating RunntimeException on OS5

I did try ur code on OS5 (BB 9000 simulator ) and it is working like a charm.

Cant see any error.

New Developer
Posts: 53
Registered: ‎06-07-2011
My Device: 9800 torch
My Carrier: o2

Re: Dialog creating RunntimeException on OS5

odd, I'm using the Storm 2(9550?) simulator and real device and it throws the error
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Dialog creating RunntimeException on OS5

use this

 

ButtonField button = new ButtonField("Press Me",ButtonField.CONSUME_CLICK);

 

New Developer
Posts: 53
Registered: ‎06-07-2011
My Device: 9800 torch
My Carrier: o2

Re: Dialog creating RunntimeException on OS5

the ButtonField isnt the issue, it's not there in the actual app, it was just a way to get the dialog box to show up in the same sort of context as my app.

 

On a slight different but related note, why do i need to tell the system that the button should consume the click? Thats insane, who wants a button that doesnt consume the click? What situation would that be normal? If your going to offer that as an option why is it a default, consuming the click should be the default and not consuming the click should be the option. Rant over!

Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Dialog creating RunntimeException on OS5

if that solved ur problem, why not marked this as solved.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Dialog creating RunntimeException on OS5

[ Edited ]

Just out of interest, does CONSUME_CLICK actually resolve the issue in your test case?  If it does, that may well give us a hint to the real problem.

 

I do think you are hitting a Storm related issue rather than an OS 5.0 related issue.  The Storm is different in its processing of events, to the extent I try not to support it if I can get away with it....

 

Try another OS 5.0 device to see if the problem is present there also.

 

I won't have time to test this code myself till much later.

Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Dialog creating RunntimeException on OS5

It does resolve the issue in 9550 and not throwing RuntimeException

 

 

New Developer
Posts: 53
Registered: ‎06-07-2011
My Device: 9800 torch
My Carrier: o2

Re: Dialog creating RunntimeException on OS5


rabiray wrote:

if that solved ur problem, why not marked this as solved.


because I didnt realise that was the issue at the point. The button in test was just implemented to allow you to get the dialog to pop up in the same sort of way as my app does(i.e. after pressing something  dialog pops up).

 

The "consume click" rant i went on was at the general absurdity of having to tell the system that the button must consume the click. Doesnt that sound stupid to you?

 

I just tested it and it does work. will mark your post as the solution