W3C home > Mailing lists > Public > public-geolocation@w3.org > July 2008

RE: skeleton Geolocation API

From: Shyam Habarakada <shyamh@microsoft.com>
Date: Mon, 28 Jul 2008 09:16:05 -0700
To: Doug Turner <doug.turner@gmail.com>, Chris Prince <cprince@google.com>
CC: Andrei Popescu <andreip@google.com>, Alec Berntson <alecb@windows.microsoft.com>, Aaron Boodman <aa@google.com>, "public-geolocation@w3c.org" <public-geolocation@w3c.org>
Message-ID: <F2726D43C21D084F81F9C887BE881BD15514FA8B9E@NA-EXMSG-C105.redmond.corp.microsoft.com>

Any other feedback on this topic? It would be great to drive the topic on the signature of get/watch functions to closure.

Andrei,
The group has had a lot of good discussion on if errorCallback should or should not be optional. And most people who commented also indicated that they could go either way on that ...

Current proposal is,

    void getPosition(successCallback, errorCallback [, positionOptions]);
    int watchPosition(successCallback, errorCallback [, positionOptions]);

where,
    successCallback is required and must be non-null (else the method will throw at runtime).
    errorCallback // OPEN ISSUE on whether this is optional or required.
    positionOptions is optional and may be null.


shyam habarakada
Microsoft Corporation



-----Original Message-----
From: public-geolocation-request@w3.org [mailto:public-geolocation-request@w3.org] On Behalf Of Shyam Habarakada
Sent: Thursday, July 24, 2008 5:14 PM
To: Doug Turner; Chris Prince
Cc: Andrei Popescu; Alec Berntson; Aaron Boodman; public-geolocation@w3c.org
Subject: RE: skeleton Geolocation API


The two options only present stylistic preferences at this point. In the two callbacks approach, the underlying code does the status check. In the one callback with status code as an argument approach, the calling code does the status check. IMO, the choice here is not a scientific decision.

-----Original Message-----
From: Doug Turner [mailto:doug.turner@gmail.com]
Sent: Thursday, July 24, 2008 4:22 PM
To: Chris Prince
Cc: Andrei Popescu; Alec Berntson; Aaron Boodman; Shyam Habarakada; public-geolocation@w3c.org
Subject: Re: skeleton Geolocation API

and having two callback instead of one-that-passes- a-status-code  is
because of what?

On Jul 24, 2008, at 12:11 PM, Chris Prince wrote:

>> So how about having both callbacks required?
>
> Makes sense to me.
Received on Monday, 28 July 2008 16:16:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 March 2012 18:13:39 GMT