Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A93819EF5 for ; Thu, 21 Apr 2016 09:48:39 +0000 (UTC) Received: (qmail 43393 invoked by uid 500); 21 Apr 2016 09:48:39 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 43366 invoked by uid 500); 21 Apr 2016 09:48:39 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 43348 invoked by uid 99); 21 Apr 2016 09:48:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2016 09:48:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C5FA1C02A0 for ; Thu, 21 Apr 2016 09:48:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_BL_SPAMCOP_NET=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id TFDNVcuXOoDO for ; Thu, 21 Apr 2016 09:48:34 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 52B875FBBD for ; Thu, 21 Apr 2016 09:48:34 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id e201so80140444wme.0 for ; Thu, 21 Apr 2016 02:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=GFZeTELzDUKlvPtVo5jeIj37sfWJAx61Sb9iiBHkbeI=; b=bEhNiyzLegag+WnCtg6BXv5Vf/RiELPygLeJEyh8R9Xz+JYuvVg/PawPF9U1T4D4PP HaYFSQSbiwIieHk+d9T8eGJyTqyBXZOSOLnxziFkBAFQ+HtnN409QtToSPtFhzcfi70c mNwPXLWwqSF2jmEJGDyR3l1XC9PBw2p87pVBidcEZN9rAaq93cZehJcM8fXYx8PBFCGq VoHrXsPe4bCb/AM/LlH18fDbfbVOBmwoASuJOWcACgryoLuFD+bdBSFn5i1aPW/KK2W4 Nmxe9OIJ9kUlGwPanIbC9Snxqe7y/+DjOEaa6mLk8kRSPiKKvDksyFT63+yI3kyUV6sX M25Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=GFZeTELzDUKlvPtVo5jeIj37sfWJAx61Sb9iiBHkbeI=; b=dyEq5bO7JP2qaMFpLJEgHQRbDovfY19MiGPeQn1jWzdRDo/T6pYB/e0sBxe5JnEp3u 8NvvqcXc2wslQF/qCmWcr+dwkmcOOh7oR8IOxhP0Vw8EPVI9TaOJmuVEdKI9qTi6jyFv jdLJPwjjrLVMrKzDFhX7ZDyV6bX7pfoFHcCLLW8laOgx1+WonMlXxthu/ipVoMsO9eS2 3y6HEhp2y2/PheGvvp2Q5mxl76oJ8eeIEQnBozMw5eY/0mc1RmIW9o7D+4IPMN/ekM27 11IsWxFO+tQgB5NObCGKfEJLHHdtAj50mHnbq6lkMtAUGUFhcD5YfR69m53UDGO4aE61 qecQ== X-Gm-Message-State: AOPr4FXipL0P9ceXl1guc8XzEhsHSa6ra4+QzHbf2r7BKyn53rMxg1ps79mbaGIBAU3Q4Q== X-Received: by 10.28.49.3 with SMTP id x3mr13567897wmx.4.1461232113968; Thu, 21 Apr 2016 02:48:33 -0700 (PDT) Received: from [127.0.0.1] ([185.120.126.96]) by smtp.gmail.com with ESMTPSA id 186sm14083640wmk.2.2016.04.21.02.48.32 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Apr 2016 02:48:33 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: FlexJS, JQuery and FDT From: Harbs In-Reply-To: Date: Thu, 21 Apr 2016 12:48:29 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <3BD7E6FC-99C4-457A-9A12-D25D9ED80B96@gmail.com> References: <08481C36-740D-419D-9E85-EF7A1893C1F2@gmail.com> <3B6419D2-E331-4898-8E99-24A07B6B423A@gmail.com> <4A80C78A-3E1D-41A0-A217-38845A0468C9@gmail.com> <5D33EC56-8E59-4B78-8F18-B5F4D361C1B7@gmail.com> <394885FF-2FAF-4B89-A417-9C89A5D44FA5@gmail.com> <2A8FA2A7-FC67-4738-8424-A8F64ABBB38E@gmail.com>, To: users@flex.apache.org X-Mailer: Apple Mail (2.1878.6) OK. Can you recommend a workflow so these changes are properly captured? On Apr 21, 2016, at 12:40 PM, Christofer Dutz = wrote: > Hi, >=20 > just a request from my side, If you adjust any of the = pre-/post-processing scripts or change javascript downloads, please = inform me about that cause these are impossible to auto-merge and even = harder to detect. >=20 > Chris >=20 > ________________________________________ > Von: Alex Harui > Gesendet: Donnerstag, 21. April 2016 09:07 > An: users@flex.apache.org > Betreff: Re: FlexJS, JQuery and FDT >=20 > We do these kinds of changes with Ant replace and replaceregex in the > build.xml. See the top-level build.xml and the externc.js.swc target. >=20 > -Alex >=20 > On 4/21/16, 12:04 AM, "Harbs" wrote: >=20 >> Bah. .gitignore has this entry: externs/jquery/externs >>=20 >> Is there any way to make this change and have it =93stick=94 in the = repo? >>=20 >> On Apr 21, 2016, at 10:00 AM, Harbs wrote: >>=20 >>> OK. I=92ll make that change. I don=92t have time to test today, so = I=92ll see >>> what happens in the next nightly=85 >>>=20 >>> On Apr 21, 2016, at 9:55 AM, Alex Harui wrote: >>>=20 >>>> I think it should be: >>>>=20 >>>> /** >>>> * @const >>>> * @type {jQuery} >>>> */ >>>> var $ =3D jQuery; >>>>=20 >>>> Look at other extern files for similar usage. >>>>=20 >>>>=20 >>>> -Alex >>>>=20 >>>>=20 >>>>=20 >>>> On 4/20/16, 11:36 PM, "Harbs" wrote: >>>>=20 >>>>> Yes. I was looking in asjs instead of falcon=85 >>>>>=20 >>>>> I=92ve never done typdefs before. Does this look right? >>>>>=20 >>>>> /** >>>>> * @const >>>>> * @typedef {jQuery} >>>>> */ >>>>> var $ =3D jQuery; >>>>>=20 >>>>> It=92s currently: >>>>> /** >>>>> * @const >>>>> */ >>>>> var $ =3D jQuery; >>>>>=20 >>>>> On Apr 21, 2016, at 9:25 AM, OmPrakash Muppirala >>>>> >>>>> wrote: >>>>>=20 >>>>>> I think this is what you are looking for? >>>>>> : flex-falcon\externs\jquery\externs\jquery-1.9.js >>>>>>=20 >>>>>> Thanks, >>>>>> Om >>>>>>=20 >>>>>> On Wed, Apr 20, 2016 at 11:21 PM, Harbs >>>>>> wrote: >>>>>>=20 >>>>>>> I=92m looking for where the jQuery definitions are and I can=92t = seem to >>>>>>> find >>>>>>> it. >>>>>>>=20 >>>>>>> On Apr 21, 2016, at 3:17 AM, Alex Harui = wrote: >>>>>>>=20 >>>>>>>> Looks like the externs file doesn't have an @type for the $ >>>>>>>> constant. >>>>>>> You >>>>>>>> can try adding it in the build script or see if Google will = accept >>>>>>>> a >>>>>>> patch >>>>>>>> for it. >>>>>>>>=20 >>>>>>>> -Alex >>>>>>>>=20 >>>>>>>> On 4/20/16, 4:13 PM, "Harbs" wrote: >>>>>>>>=20 >>>>>>>>> Replacing =93$=94 with =93jQuery=94 makes the warnings go = away. Why would >>>>>>>>> =93$=94 be >>>>>>>>> different than =93jQuery=94? It sounds to me like a bug in the >>>>>>>>> definitions. >>>>>>>>>=20 >>>>>>>>> jQuery always returns a JQuery object which has many defined >>>>>>>>> methods. >>>>>>> One >>>>>>>>> of those is attr. >>>>>>>>>=20 >>>>>>>>> On Apr 21, 2016, at 1:50 AM, Alex Harui = wrote: >>>>>>>>>=20 >>>>>>>>>> IMO, this is why Jquery is painful for strong typing. >>>>>>>>>>=20 >>>>>>>>>> I think you may need to do casting: >>>>>>>>>>=20 >>>>>>>>>> ($("#topcoat") as Whatever).attr(..) >>>>>>>>>>=20 >>>>>>>>>> Where Whatever is a "type" that has an attr function. >>>>>>>>>>=20 >>>>>>>>>> And you may need to use @flexjsignorecoercion or other = compiler >>>>>>>>>> options >>>>>>>>>> to >>>>>>>>>> not actually do the "as" test in the JS output. >>>>>>>>>>=20 >>>>>>>>>> Good luck, >>>>>>>>>> -Alex >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>> On 4/20/16, 3:46 PM, "Harbs" wrote: >>>>>>>>>>=20 >>>>>>>>>>> Here=92s an example: >>>>>>>>>>> $("#topcoat").attr("href", >>>>>>>>>>> "css/topcoat-desktop-lightlight.min.css"); >>>>>>>>>>>=20 >>>>>>>>>>> It looks like =93$=94 is defined as an object. >>>>>>>>>>>=20 >>>>>>>>>>> Here=92s the exact warnings I=92m getting: >>>>>>>>>>>=20 >>>>>>>>>>> Could not resolve variable (may be a dynamic member) 'attr' = at >>>>>>>>>>> line 43 >>>>>>>>>>> column 19. ThemeManager.as /MyExtension/src/com/unhurdle >>>>>>>>>>> Unknown >>>>>>> Flash >>>>>>>>>>> Problem >>>>>>>>>>> Maybe invoking a non function. Found >>>>>>>>>>>=20 >>>>>>>>>>>=20 >>>>>>>>>>> = $("#topcoat").attr("href","css/topcoat-desktop-lightlight.min.css >>>>>>>>>>> "); >>>>>>> at >>>>>>>>>>> line 43 column >>>>>>>>>>> 5. ThemeManager.as /MyExtension/src/com/unhurdle Unknown = Flash >>>>>>> Problem >>>>>>>>>>>=20 >>>>>>>>>>> And yes, js/libs/jquery.swc is included. If I remove it, I = get >>>>>>>>>>> an >>>>>>> error >>>>>>>>>>> that =93$=94 is not defined instead of a warning. >>>>>>>>>>>=20 >>>>>>>>>>> On Apr 21, 2016, at 1:39 AM, Alex Harui >>>>>>>>>>> wrote: >>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>>=20 >>>>>>>>>>>> On 4/20/16, 3:34 PM, "Harbs" wrote: >>>>>>>>>>>>=20 >>>>>>>>>>>>> Does anyone know if there=92s a way to get FDT to not flag >>>>>>>>>>>>> JQuery >>>>>>>>>>>>> expressions with =93could not resolve variable=94 and = "Maybe >>>>>>>>>>>>> invoke a >>>>>>> non >>>>>>>>>>>>> function=94 warnings? >>>>>>>>>>>>=20 >>>>>>>>>>>> What kind of expressions result in this output? Are you = sure >>>>>>>>>>>> you >>>>>>> have >>>>>>>>>>>> the >>>>>>>>>>>> jquery.swc from the externs on the -external-library-path? >>>>>>>>>>>>=20 >>>>>>>>>>>> -Alex >>>>>>>>>>>>=20 >>>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>=20 >>>>=20 >>>=20 >>=20 >=20