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 BDE9019825 for ; Thu, 21 Apr 2016 07:00:12 +0000 (UTC) Received: (qmail 23004 invoked by uid 500); 21 Apr 2016 07:00:12 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 22976 invoked by uid 500); 21 Apr 2016 07:00:12 -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 22964 invoked by uid 99); 21 Apr 2016 07:00:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2016 07:00:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B1420C05EF for ; Thu, 21 Apr 2016 07:00:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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: spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 8PrfT56mrF6b for ; Thu, 21 Apr 2016 07:00:09 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C1C265F239 for ; Thu, 21 Apr 2016 07:00:08 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id v188so231309603wme.1 for ; Thu, 21 Apr 2016 00:00:08 -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=jZ355zWas0LOUxE4vdWNwF/9PFom9hDQTgwqg8PysoU=; b=nJLDOgAS/1NG3VBX7ObJicXq48El7U/nEEgLg83XVVZ2bsi19ogEa8mRvu9erZol6J wliFc5S7OacTGuSSxV5r2ExmoiPISTsPzDd/e9PiC0I1WZ0A8i3RBrj1M8Jzga0A8uNp 4Zp0qa/2fHWSErpstUNvzepkVQObapBCKkoRj+m8HDOKMWO58aAK6rnztx8a+sebIS8U ebqYsAmygtjYdcB5gWECxX2N4GkL5EfraRa0mppkPrQyCb1wwKCIcIHSPym7acvvF2as Mm9yvrtSkfgG1tOqyLuDF+rw/NwqXkGmYp5ByGMACXWFyFaolkTZm1M7SHbbbdi9+U3b zLMA== 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=jZ355zWas0LOUxE4vdWNwF/9PFom9hDQTgwqg8PysoU=; b=Jezu4u2MBttK22jJqNzkdIvA+sG0698za7slVVa81ywy7BnQY7q0NQeZJ6AjTWfUR+ AdmeUuuZk8cyGbAQ6JqfuWlV9eIoonMlRhYiP8Pe4hNLTFaqzLSVVsP8lolY2JDAk7x7 QE5YX4uc1pAY40vaNnp9FY9pLaq8HT7yqs1k1VZzXQV9Bk0kOetcfW2r8rRKWQ/WcS9p zfSs3g3Xd1xvWX8y11nn2FTnqRcRc1ZNqUskbJSnZS5Q8hG2Vf+0z1y6oeBssovAyJC6 uRflzetj2pQY9uoa5KVMYPlOuI0Ll3+Yn+6emclf3NqIwJmHo29bE1dpTrpWd2uJHl8D UnOg== X-Gm-Message-State: AOPr4FW4D17oYaXQ/Ivqo1ajcVlrmGTiN2mkxHJ15T/yMBONLoeOnnCadD01o32IT3ajbw== X-Received: by 10.194.231.104 with SMTP id tf8mr12180158wjc.5.1461222008411; Thu, 21 Apr 2016 00:00:08 -0700 (PDT) Received: from [127.0.0.1] ([185.120.126.96]) by smtp.gmail.com with ESMTPSA id u79sm13255736wmu.8.2016.04.21.00.00.07 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Apr 2016 00:00:07 -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 10:00:07 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <394885FF-2FAF-4B89-A417-9C89A5D44FA5@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> To: users@flex.apache.org X-Mailer: Apple Mail (2.1878.6) 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 On Apr 21, 2016, at 9:55 AM, Alex Harui wrote: > 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 >>>>>>>> = $("#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