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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
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     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
Developer
lewellyn
Posts: 110
Registered: ‎10-22-2011
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! :smileyvery-happy:
Please use plain text.
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
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     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
Developer
lewellyn
Posts: 110
Registered: ‎10-22-2011
My Carrier: Sprint

Re: Can't get NavigationDialog to show.

It's always something simple. :smileyvery-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! :smileyvery-happy:
Please use plain text.