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: 58
Registered: ‎02-14-2011
My Device: Bold 9700
My Carrier: Rogers
Accepted Solution

Dialog throws NULL exception

[ Edited ]
function promptEditSave(){
	try {
		blackberry.ui.dialog.standardAskAsync("Continue without saving?", blackberry.ui.dialog.D_SAVE, editSavePromptCallBack(), {title : "Save changes?", size: blackberry.ui.dialog.SIZE_MEDIUM, position : blackberry.ui.dialog.CENTER});
	}catch (e) {
		alert("Exception in: " + e);
	}
}

For some reason everytime I call promptEditSave(); I get this error from the try/catch: "Exception in: null"

 

Now ripple isnt throwing any errors however when testing on a 9700 OS6 device the error is thrown...

 

What am I not doing right?

BlackBerry Development Advisor
Posts: 761
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Dialog throws NULL exception

Hi there, the only thing that seems to stand-out to me is where you're setting your callback.  Can you remove the '()' and make it look like this:

 

... ("Continue without saving?", blackberry.ui.dialog.D_SAVE, editSavePromptCallBack, {title : "Save changes?" ...

 

Developer
Posts: 58
Registered: ‎02-14-2011
My Device: Bold 9700
My Carrier: Rogers

Re: Dialog throws NULL exception

That did it!

 

Thank you for your time and response. 

 

Justam