How to show notification on tizen - c++

i need to show notification on tizen.
i've try the below code.
Tizen::Shell::NotificationManager notiMgr;
notiMgr.Construct();
NotificationRequest request;
request.SetAlertText(L"AlertText");
request.SetTitleText(L"TitleText");
request.SetAppMessage(L"AppMessage");
request.SetNotificationStyle(NOTIFICATION_STYLE_NORMAL);
notiMgr.Notify(request);
i will get notification while put this code into tizen notification example.That means this code works any form in the example.However,in my simple button click i can't.There is no error occur while click the button.But nothing happens.

As the logs say: "The application does not have the privilege to call this method."
If you look up NotificationManager::Notify you'll see that it requires the privilege http://tizen.org/privilege/notification.
To request this priviledge for your app, open your manifest.xml file, click on the Privileges tab, click Add..., enter the string http://tizen.org/privilege/notification, click OK and rebuild/deploy your app.

Related

How can I Close a popup window, after execute Update SQL. (Oracle APEX 21.1)

I created a pop-up page. That pop-up window has a radio button, a text box, and an execute button. I want to work that page working like... when pressing the button, run a update SQL with the values of the radio button and text box, and close itself.
I tried that answer in the following link. But the pop-up page just reloaded and the page stayed open. How to close popup window in Oracle-apex?
If possible, I would like to validate the value of the text box. If it was an incorrect value then break the process with a message. If path that validation, run a update SQL and close the pop-up window.
Thank you for your kindness for read this confusing question.
You should be using a "Close Dialog" process type after your Save Process.
Make sure that you also set the server side condition accordingly so that the dialog only closes after your save process.
I GOT RESOLVED IT!
Not use any close method, redirect util is fine work like this APEX_UTIL.REDIRECT_URL (APEX_PAGE.GET_URL(p_page => 7));
Thank you to all ppl for look this page :)

VSTO 4: How detect TAB is visible/chosen?

Do you know how can I detect when my Outlook AddIn TAB is visible/selected at some moment?
My problem: sometimes users press the Outlook default SEND button instead my own SEND button (required for some posterior processing) and I would like to detect it to call the user's attention.
The problem is also that, users CAN press the default SEND button for messages not related/addressed to some recipients...
Objectively: if the user is, at the moment, in my TAB, I send a MessageBox to him, otherwise I don't.
Thank you!

Python Selenium Webdriver: How to handle Alert Windows

I've webpage wherein I select 'Disable' radio button and click 'Apply/Save' button to apply settings. But unfortunately an Alert window pops saying 'If disabled, the information captured by the Broadband Router will be lost. If you wish to save the current log information, click the "Cancel" button, view the current system log, and use the Save option from the File menu to save the log data.'
How do I click 'ok' button to accept the applied settings?
Please below the screenshot for reference.
Please find below my python code:
Note: My alert.accept() function is not clicking the 'ok' button to apply settings
from selenium import webdriver
driver = webdriver.Firefox()
driver.find_element_by_xpath('/html/body/blockquote/form/table[1]/tbody/tr/td[2]/input').click()
try:
driver.find_element_by_xpath('/html/body/blockquote/form/p/input').click()
alert = driver.switch_to.alert()
alert.accept()
except:
print 'Not disabled'
I'm new to automation. If the focus is on OK button, you could try
SendKeys.SendWait(#"{ENTER}");
This worked for me in c#.
Try alert command with some wait or sleep to appear. If it is not working you may try with simulating keys. JavascriptExecutor work very well here.
In Java
JavascriptExecutor js=(JavascriptExecutor)driver;
js.executeScript("call function to accept");
Thanks
I realize this is an old post, but for future reference, I will try to answer the question.
alert = driver.switch_to.alert()
The above code is incorrect. alert is not a function call, but a variable.
alert = driver.switch_to.alert
Notice how the next code is missing parentheses. This is the correct code.

Visual C++ message box different behavior if click OK or hit enter

In visual c++, I am using a message box to warn the user about invalid entry in a dialog. When the entry is invalid and the user clocks OK in the dialog, a message box pops up which the user acknowledges by clicking OK and the original dialog is still available for the user to correct his entry.
My problem is that I see different behavior when the user hits enter on the keyboard vs clicking on the OK button in the dialog. When the user hits enter instead of clicking OK in the original dialog, the message still pops up but then everything goes away after the message is acknowledged (the dialog does not persist under it like with clicking OK).
The message box is based on WinUser.h method MessageBoxA. Any suggestions why this is or how to work around it?
Maybe the CANCEL option is the DEFAULT - Enter key will simulate the click of the DEFAULT Button, i.e the one with the dashed frame

Show Message Bar in ribbon mfc

Probabbly i am not sure what to search for ... But the idea is to display a message bar bellow ribbon control. When user try to edit a read only file. I don't want user to click on OK to remove error message. Thats why i can't use MessageBox.
Status bar doesn't seem right place to display error messages.
Which control i should start exploring.
MSOffice normally displays such message when user opens files in protected view .
I don't want you to do research for me, I just want the right direction i will do the rest.
Thanks
You can easily use CMFCCaptionBar for such an attempt. When you create a ribbon bar SDI application you get sample code for free.
Also it is possible to hide and Show such a bar on the fly with ShowWindow. Also this code is generated by the wizard.