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 E9D1B9A21 for ; Mon, 16 Apr 2012 23:44:54 +0000 (UTC) Received: (qmail 10046 invoked by uid 500); 16 Apr 2012 23:44:54 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 10016 invoked by uid 500); 16 Apr 2012 23:44:54 -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 9988 invoked by uid 99); 16 Apr 2012 23:44:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2012 23:44:54 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of fil@adobe.com designates 64.18.1.208 as permitted sender) Received: from [64.18.1.208] (HELO exprod6og107.obsmtp.com) (64.18.1.208) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2012 23:44:47 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob107.postini.com ([64.18.5.12]) with SMTP ID DSNKT4yu21geqUAQOVvYpeiyHIlYsAoAJVj0@postini.com; Mon, 16 Apr 2012 16:44:27 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4.adobe.com [193.104.215.14]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q3GNgIJ0027420 for ; Mon, 16 Apr 2012 16:42:18 -0700 (PDT) Received: from nahub01.corp.adobe.com (nahub01.corp.adobe.com [10.8.189.97]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id q3GNiOYr000429 for ; Mon, 16 Apr 2012 16:44:24 -0700 (PDT) Received: from nambxv01a.corp.adobe.com ([10.8.189.95]) by nahub01.corp.adobe.com ([10.8.189.97]) with mapi; Mon, 16 Apr 2012 16:44:23 -0700 From: Filip Maj To: "callback-dev@incubator.apache.org" Date: Mon, 16 Apr 2012 16:46:26 -0700 Subject: Re: JS: tagged 1.6.1 Thread-Topic: JS: tagged 1.6.1 Thread-Index: Ac0cKtnRCxZHzde5R3yXSIMkJikVEw== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.14.0.111121 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org With respect to 1.6.1, I would change the native side on iOS, Shaz, to call: cordova.require('cordova/channel').onResume.fire(); (or onPause) Depending on what approach everyone thinks we should use (the first or second of my suggestions below, or something else entirely) we can slate that change for all platforms for 1.7. On 4/16/12 4:42 PM, "Filip Maj" wrote: >I see the issue. > >fireDocumentEvent looks at the documentEventHandlers and checks if >something exists in that object with the name of the event. We never >actually register resume or pause channels with the >"documentEventHandlers" object, so calling firedocumentevent will never >work. > >Android just requires the channel module directly and fires the proper >onResume / onPause channels [1]. > >This is implemented inconsistently. We should do something one way and >stick to it. Either have: > >- cordova.js create the resume + pause channels and register them using >the addDocumentEventHandler [2] method, and have native side call >cordova.fireDocumentEvent, OR >- keep the manual creation of the pause/resume channels [3], and have >native call cordova.require('corodva/channel').(onPause || >onResume).fire() > >[1]=20 >https://github.com/apache/incubator-cordova-android/blob/master/framework/ >s >rc/org/apache/cordova/DroidGap.java#L889 >[2]=20 >https://github.com/apache/incubator-cordova-js/blob/master/lib/cordova.js# >L >94 >[3]=20 >https://github.com/apache/incubator-cordova-js/blob/master/lib/common/chan >n >el.js#L225-L229 > >On 4/16/12 4:30 PM, "Shazron" wrote: > >>I'm failing two manual tests. Step 1 of >>http://wiki.apache.org/cordova/iOSManualTests - I'm not getting pause >>and resume events for some reason, but all other events are fine. >> >>I've verified I'm getting the lifecycle events in native, but when >>calling to javascript "cordova.fireDocumentEvent('pause') " and >>"cordova.fireDocumentEvent('resume') " - none of the my callbacks are >>receiving the event. >> >>Any clue? I see there are overrides for document.addEventListener that >>special-case these two events though, not sure what's going on in >>there yet. Debugging. >> >>On Mon, Apr 16, 2012 at 3:20 PM, Joe Bowser wrote: >>> Re-tagged Android at 1.6.1, somehow the JS was already changed. >>>Creepy! >>> >>> On Mon, Apr 16, 2012 at 3:09 PM, Filip Maj wrote: >>> >>>> Do what you need to do, team. >>>> >>>> >