From callback-dev-return-4322-apmail-incubator-callback-dev-archive=incubator.apache.org@incubator.apache.org Tue Apr 3 21:28:02 2012 Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 64F339983 for ; Tue, 3 Apr 2012 21:28:02 +0000 (UTC) Received: (qmail 98193 invoked by uid 500); 3 Apr 2012 21:28:02 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 98171 invoked by uid 500); 3 Apr 2012 21:28:02 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 98162 invoked by uid 99); 3 Apr 2012 21:28:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 21:28:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gibson.becky@gmail.com designates 209.85.213.47 as permitted sender) Received: from [209.85.213.47] (HELO mail-yw0-f47.google.com) (209.85.213.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 21:27:54 +0000 Received: by yhjj56 with SMTP id j56so119574yhj.6 for ; Tue, 03 Apr 2012 14:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=RK8VUbwEEYcwT6E/PPfHjf3S+oP765g9Ms+q5IklJBs=; b=mxR1xK1LvweZUkuG3ZFuCp5+YvaooRft7iM9bYizgQZIien3EoSfuObG/TxNRGh7W2 n3IIR3qFWU+kBW4A73LaMyH31YySRBD5bMxyAAupi21oIXneRcsr4oJTv8AdkQHQP3b/ lP3YLGcGpdLl6Hsdg9g0oxSwh0HQSbE8uz6h++xj7I9EI1Hyy4OK5qpnipQ8yw0Q609S VuImSUKamxcHc+jgzlpovAvt04plmE5YspcHyEukjwB+W7wH8YhhocOHzLobD00l4YI3 v3ZhIn7OrfCJXkO2bbaHZHeg66pB0f+PLW3iJx2ElCqvmUAfZyb9tt8SMf3kZZTy4y1z rugA== MIME-Version: 1.0 Received: by 10.236.153.73 with SMTP id e49mr13060390yhk.4.1333488453495; Tue, 03 Apr 2012 14:27:33 -0700 (PDT) Received: by 10.147.181.15 with HTTP; Tue, 3 Apr 2012 14:27:33 -0700 (PDT) In-Reply-To: References: Date: Tue, 3 Apr 2012 17:27:33 -0400 Message-ID: Subject: Re: Passing parameters to camera.getPicture instead of object -WHY? From: Becky Gibson To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=20cf303b3af39529ae04bcccf98b --20cf303b3af39529ae04bcccf98b Content-Type: text/plain; charset=ISO-8859-1 Ok, so to support iOS camera.getPicture for this release, I need to add 3 more arguments to the takePicture device api - bringing the total up to 10! And then in 1.7, we get to undo all of this work - wtf? And, just for the record, the call to exec from the Android 1.4.1 camera.getPicture() accepted an options parameter and passed those to CameraLauncher.java as an object. sorry, but I'm just a bit cranky as I keep discovering all of the things that are broken in unified JS. -b On Tue, Apr 3, 2012 at 4:57 PM, Shazron wrote: > Hi Fil, > Just to make sure since I have to verify all the APIs don't use the > options object anymore and possibly fix those -- this was done across > the board, true? > > Yeah lets do a hashmap thing for arguments in some future release, > indexed arguments are brittle. > > Shaz > > On Tue, Apr 3, 2012 at 1:51 PM, Shazron wrote: > > My guess is this change was to match the Android side, I had to make > > the same change for Notification API, which broke because of this. > > > > On Tue, Apr 3, 2012 at 1:44 PM, Becky Gibson > wrote: > >> Somehow I missed this change in unified JS. Why are we now passing an > array > >> of parameters to getPicture rather than an options object? By passing > the > >> object, we allowed people to easily extend the getPicture api by just > >> adding their new option into an options object and modifying their copy > of > >> the device specific camera implementation. They did not have to modify > the > >> PhoneGap/Cordova.js implementation (at least on the iOS side). Now, in > >> order to add a new parameter to getPicture, you need to modify the JS as > >> well to pass yet another parameter into getPicture - the list is already > >> long and we have lost some of the iOS options that were available. > >> > >> curious minds are a dangerous thing...... > --20cf303b3af39529ae04bcccf98b--