I am more reporting an issue with basic functionality, then looking to change the implementation.
which RhoElements Version do you use? If you use V2, test it with RhoElements V18.104.22.168, if possible.
Hi Michael Toews from T2 support here on behalf of TA Peter Arcuri
I Attempted to reproduce this issue with no success.
The steps I used to try to reproduce are as follows:
1) Created a generic app in RMS (File>new>project>rhomobile application)
2) Once app is created edit index.erb file to add in js that you posted on here.
3) Launched the app and on button press confirmation window popped up.
4) I click yes and the alert pops up with "true"
5) I pushed the button again, clicked no and the alert pops up with "false"
I am using Rhomobile suite version 22.214.171.124 downloaded from motorola today (09/27/2012) which utilizes the rhodes gem version 3.4.2.
I tested this in the rhosimulator, not on a device but I do not anticipate any possibility of change in this behavior with a device however I will test on one if you would like me to do so.
Select OK again to see the error. As indicated, we always select OK, never Cancel, but get the Cancel result on subsequent attempts. The first attempt works, the 2nd to n attempt fail returning that you selected Cancel, not Ok.
I just tried this again in the Rhosimulator of Rhomobile Suite 126.96.36.199 (same as before):
1) Pressed "yes" and saw result "true" every time.
2) To make sure, I pressed "cancel" and saw "false" every time.
3) Once again pressed "yes" a few times to make sure it alerted with "true" still and it did.
alert(confirm("Press a Button!"));
<li><button onclick="testConfirm()">JS Test</button>
Most of this is taken from the initial index.erb that creating an app gives you. The button and the js is all added.
Message was edited by: Michael Toews typo Confirm -> confirm
It appears that this might be related to hand held units. We are testing with a new hand held from our customer running the 188.8.131.52 on a Symbol 9190, and it does not have the Confirm() issue. However, our Symbol 9190 with the 184.108.40.206 downloaded today from Motorola still has the issue.
There is a difference in the underlying version of software on the hand helds outside of Rho Elements. The customer has version 5.2.29040 and our unit is 5.2.23121.
Steven, thank you for making the discovery. It sounds as the OS build on your Symbol 9190 is running an old OS buld. Updating this device to BSP 2.41 should provide same results as your customer's device. Below is the link for downloading BSP 2.41.
We have the same issue on MC3190 with Windows CE 6.0, the latest BSP/firmware using RHO Elements 220.127.116.11 with the 4 additional optimization dlls. The confirm call always return false.
Issue found and fixed. Will be available in RMS 2.3
Thanks for fixing this Evgeny, this will make it into 2.2.