Page 1 of 1

OnFocus : SetValue Set delay Working on CSPro 7.7

Posted: May 26th, 2022, 12:14 pm
by pradhanra01
Hi Martin,

Good Evening !

I am trying to take photo from android device; there should be a optional SetValue set option to be applied if the file is exit in device while taking photo; same syntax it works in 7.5 CSPro without any delay but in 7.7 there is delay in changing SetValue Set command in Onfocus, to change SetValue Set need to move forward and again click back..... For further information I have attached my program with zip file for your reference.

Looking forward to hearing from you Martin.

Thank You & Regards,
Ramesh Pradhan

Re: OnFocus : SetValue Set delay Working on CSPro 7.7

Posted: June 1st, 2022, 9:41 am
by savy
I can reproduce your problem. We will fix this issue in the next version of CSPro. I have a workaround for you though. Please use image widget to take the photo instead of execsystem and the behavior will be same as what it was in 7.5.
https://www.csprousers.org/help/CSPro/i ... ction.html

Re: OnFocus : SetValue Set delay Working on CSPro 7.7

Posted: June 2nd, 2022, 4:24 am
by pradhanra01
Thank You so much Savy

Re: OnFocus : SetValue Set delay Working on CSPro 7.7

Posted: June 13th, 2022, 4:35 pm
by alex_izm
Turns out this is not a bug in CSPro after all. The described behavior occurs because when execSystem() function is called without 'wait' argument, the camera activity returns the result before the picture is taken, and therefore the field is reentered while image file doesn't yet exist. I've changed line:

Code: Select all

ExecSystem(MakeText("camera:%s", PHOTO1));
to

Code: Select all

ExecSystem(MakeText("camera:%s", PHOTO1), wait);
and it worked properly.