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

Native Development

Reply
Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers
Accepted Solution

Can't get NavigationDialog to show.

I have this code in a simple HelloCascades app....but the dialog doesn't show.  Any idea what I am missing?  Thanks.

 

NotificationDialog *notification = new NotificationDialog(this);
	notification->setTitle("TEST");
	notification->setBody("THIS IS THE BODY");
	SystemUiButton *yesButton = new SystemUiButton("Yes");
	SystemUiButton *noButton = new SystemUiButton("No");
	notification->appendButton(yesButton);
    notification->appendButton(noButton);
	notification->show() ;

 


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Developer
Posts: 110
Registered: ‎10-22-2011
My Device: PlayBook, Bold 9650, Dev Alpha A
My Carrier: Sprint

Re: Can't get NavigationDialog to show.

At a glance, it looks like it ought to work. Does anything get logged to slog2info?

Also, out of curiosity, why are you doing it via C++ rather than QML?

For a QML example, see the notifications sample: https://github.com/blackberry/Cascades-Samples/tree/master/notifications


Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Like this post too! Smiley Very Happy
Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: Can't get NavigationDialog to show.

Your sample works fine from QML.  I saw the difference in the projects.  I didn't realize I had to set permission for "Post Notifications".  Thanks for the help.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Developer
Posts: 110
Registered: ‎10-22-2011
My Device: PlayBook, Bold 9650, Dev Alpha A
My Carrier: Sprint

Re: Can't get NavigationDialog to show.

It's always something simple. Smiley Very Happy

Glad to know that the Cascades-Samples helped. I personally keep a copy in my Momentics all the time.


Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Like this post too! Smiley Very Happy