From callback-dev-return-4321-apmail-incubator-callback-dev-archive=incubator.apache.org@incubator.apache.org Tue Apr 3 21:25:06 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 6ADD7984F for ; Tue, 3 Apr 2012 21:25:06 +0000 (UTC) Received: (qmail 89280 invoked by uid 500); 3 Apr 2012 21:25:06 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 89198 invoked by uid 500); 3 Apr 2012 21:25:06 -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 89187 invoked by uid 99); 3 Apr 2012 21:25:06 -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:25:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shazron@gmail.com designates 209.85.210.175 as permitted sender) Received: from [209.85.210.175] (HELO mail-iy0-f175.google.com) (209.85.210.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 21:24:58 +0000 Received: by iaag37 with SMTP id g37so202007iaa.6 for ; Tue, 03 Apr 2012 14:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=0jKJwTcHfh21leoPoBimgOsXkuVoFuklTPa+OoL6jyM=; b=AikCE99lWTb1XGbY52g4IH5IAfB0ad0vQ2LyB/MxdaBFxu+CTYwMFTygAK2II9KuCs AJyyST9zw1tovIqtZGZxjp8uCdAmgv9zSWMdSVhowV0izypG6E+YZ7EqOJjy/HX0jtlU 35zwLAIkhv/oiA6ye3wPhAh58lah9sKQKCFnIJZf7gM1KjfReH7qHGCccz6bfa6Qqosw 2394dmnzhaFao10FB8H4JXZAGg9rU4euX3pDL9i7Tb9q/dHmdFc4lSm0hdf+F6UKUvo1 AKrt+UFWMg/rSwXjrKn9rgmjA0XQQUB+gg8Ic5AZPZXvoa0Chg2qgMqA6m4veQNp/9jF HKDQ== Received: by 10.50.47.231 with SMTP id g7mr3284708ign.12.1333488277180; Tue, 03 Apr 2012 14:24:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.138.72 with HTTP; Tue, 3 Apr 2012 14:23:56 -0700 (PDT) In-Reply-To: References: From: Shazron Date: Tue, 3 Apr 2012 14:23:56 -0700 Message-ID: Subject: Re: Passing parameters to camera.getPicture instead of object -WHY? To: callback-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Now all we have to figure out is how to support the options stuff that was already in there without it being a maintenance nightmare... On Tue, Apr 3, 2012 at 2:03 PM, Filip Maj wrote: > Yeah I did my best to test all that on iOS when I did the integration wor= k > on that platform. Obviously missed the notification API issue that came u= p > today. > > Just to play devil's advocate, the brittle argument can work both ways :) > sure I can use the wrong array index, but I can also misspell the named > property name, and actually do that in TWO (JS + native) implementations > instead of one. > > I agree though, for readability alone, I think the options object is nice= r. > > On 4/3/12 1: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? =A0 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). =A0Now,= 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...... >