incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: Passing parameters to camera.getPicture instead of object -WHY?
Date Tue, 03 Apr 2012 21:23:56 GMT
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 <fil@adobe.com> wrote:
> Yeah I did my best to test all that on iOS when I did the integration work
> on that platform. Obviously missed the notification API issue that came up
> 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 nicer.
>
> On 4/3/12 1:57 PM, "Shazron" <shazron@gmail.com> 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 <shazron@gmail.com> 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 <gibson.becky@gmail.com>
>>>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......
>

Mime
View raw message