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 557239FE4 for ; Tue, 13 Dec 2011 00:40:00 +0000 (UTC) Received: (qmail 23960 invoked by uid 500); 13 Dec 2011 00:40:00 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 23943 invoked by uid 500); 13 Dec 2011 00:40:00 -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 23935 invoked by uid 99); 13 Dec 2011 00:40:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 00:40:00 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 00:39:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 119C610F60F for ; Tue, 13 Dec 2011 00:39:31 +0000 (UTC) Date: Tue, 13 Dec 2011 00:39:31 +0000 (UTC) From: "Filip Maj (Commented) (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1271612340.3662.1323736771073.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <411782946.27207.1322680300107.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CB-97) navigator.network.connection.getInfo returns wrong parameter to callback MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167999#comment-13167999 ] Filip Maj commented on CB-97: ----------------------------- Simon, good catch. That pretty much makes this ticket invalid. > navigator.network.connection.getInfo returns wrong parameter to callback > ------------------------------------------------------------------------ > > Key: CB-97 > URL: https://issues.apache.org/jira/browse/CB-97 > Project: Apache Callback > Issue Type: Bug > Components: BlackBerry > Reporter: Michael Brooks > Assignee: Filip Maj > > The blackberry implementation returns a JSON object to the getInfo success callback. > Android, for example, returns just a string. > Which one is the right one? I can't tell from the callback-test repo. > Here's an example of a problem I have currently on an Android and BlackBerry callback project: > {code} > navigator.network.connection.getInfo( > function(type) > { > if(type == "none" || (typeof type.type != 'undefined' && type.type == 'none')) > { > alert('no connection'); > } > else > { > alert('connectioN!'); > } > }, > function() > { > alert('something bad happened'); > }); > {code} > So the getInfo callback, in Android case, compares to a string; BlackBerry has to check it's an object and look at one of the object properties. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira