OnFocus : SetValue Set delay Working on CSPro 7.7

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
pradhanra01
Posts: 38
Joined: August 27th, 2017, 2:43 am

OnFocus : SetValue Set delay Working on CSPro 7.7

Post 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
Attachments
TAKEPHOTO.zip
(177.17 KiB) Downloaded 131 times
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: OnFocus : SetValue Set delay Working on CSPro 7.7

Post 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
pradhanra01
Posts: 38
Joined: August 27th, 2017, 2:43 am

Re: OnFocus : SetValue Set delay Working on CSPro 7.7

Post by pradhanra01 »

Thank You so much Savy
alex_izm
Posts: 19
Joined: December 9th, 2016, 11:31 am

Re: OnFocus : SetValue Set delay Working on CSPro 7.7

Post 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.
Post Reply