Re: Image Capture Proposal, second version

On 2013-02-26 09:37, Adam Bergkvist wrote:
> On 2013-02-22 23:30, Mandyam, Giridhar wrote:
>
>> currentRedEye = new Boolean;
>> currentRedEye = false;
>> if (pictureDevice.photoSettingsOptions.redEyeReduction)
>>     currentRedEye =
>> pictureDevice.photoSettingsOptions.redEyeReduction.value;
>> if (currentRedEye == true)
>>     pictureDevice.takePhoto();
>> }
>
> This block could be simplified to:
>
> if (pictureDevice.photoSettingsOptions.redEyeReduction)
>      pictureDevice.takePhoto();
>

Testing on the value may me more correct.

if (pictureDevice.photoSettingsOptions.redEyeReduction.value)
     pictureDevice.takePhoto();

Received on Tuesday, 26 February 2013 08:48:09 UTC