flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject AW: FlexJS, JQuery and FDT
Date Thu, 21 Apr 2016 11:44:47 GMT
Taking this thread to develop ... :-)

Thanks for that ... I would have missed that one ;-)

Can you or someone else here explain why EXTERNC is commenting out tons of methods in the
maven version? It's generating identical code, but it's commenting out a lot of methods (not
all) and therefore I can't build the JS externs anymore :-(

This is sort of urgent, as I only have this and next week for working on this sort of stuff.

Chris

________________________________________
Von: Harbs <harbs.lists@gmail.com>
Gesendet: Donnerstag, 21. April 2016 13:24
An: users@flex.apache.org
Betreff: Re: FlexJS, JQuery and FDT

Here you go:
https://cwiki.apache.org/confluence/display/FLEX/@internal+changes+to+build+scripts

On Apr 21, 2016, at 1:43 PM, Christofer Dutz <christofer.dutz@c-ware.de> wrote:

> That would be a better solution, but I am hoping to eliminate the need to replicate those
types of changes soon.
> But today I'm completely stuck with the JS externs no longer generating :-(
>
> Chris
>
> ________________________________________
> Von: Harbs <harbs.lists@gmail.com>
> Gesendet: Donnerstag, 21. April 2016 12:40
> An: users@flex.apache.org
> Betreff: Re: FlexJS, JQuery and FDT
>
> OK. Would it be easier to have a wiki page that we document build-related changes in,
so they are all in one place? We could send an email with a link to the page when it’s edited.
>
> On Apr 21, 2016, at 1:20 PM, Christofer Dutz <christofer.dutz@c-ware.de> wrote:
>
>> If you change something ... write an email ... I'll replicate the changes.
>> I just replicated the nodejs changes ... was quite an effort, but now I'm back on
track ... at least with that one ...
>>
>> Chris
>>
>> ________________________________________
>> Von: Harbs <harbs.lists@gmail.com>
>> Gesendet: Donnerstag, 21. April 2016 11:48
>> An: users@flex.apache.org
>> Betreff: Re: FlexJS, JQuery and FDT
>>
>> OK. Can you recommend a workflow so these changes are properly captured?
>>
>> On Apr 21, 2016, at 12:40 PM, Christofer Dutz <christofer.dutz@c-ware.de> wrote:
>>
>>> Hi,
>>>
>>> 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.
>>>
>>> Chris
>>>
>>> ________________________________________
>>> Von: Alex Harui <aharui@adobe.com>
>>> Gesendet: Donnerstag, 21. April 2016 09:07
>>> An: users@flex.apache.org
>>> Betreff: Re: FlexJS, JQuery and FDT
>>>
>>> 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.
>>>
>>> -Alex
>>>
>>> On 4/21/16, 12:04 AM, "Harbs" <harbs.lists@gmail.com> wrote:
>>>
>>>> Bah. .gitignore has this entry: externs/jquery/externs
>>>>
>>>> Is there any way to make this change and have it “stick” in the repo?
>>>>
>>>> On Apr 21, 2016, at 10:00 AM, Harbs <harbs.lists@gmail.com> wrote:
>>>>
>>>>> OK. I’ll make that change. I don’t have time to test today, so I’ll
see
>>>>> what happens in the next nightly…
>>>>>
>>>>> On Apr 21, 2016, at 9:55 AM, Alex Harui <aharui@adobe.com> wrote:
>>>>>
>>>>>> I think it should be:
>>>>>>
>>>>>> /**
>>>>>> * @const
>>>>>> * @type {jQuery}
>>>>>> */
>>>>>> var $ = jQuery;
>>>>>>
>>>>>> Look at other extern files for similar usage.
>>>>>>
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 4/20/16, 11:36 PM, "Harbs" <harbs.lists@gmail.com> wrote:
>>>>>>
>>>>>>> Yes. I was looking in asjs instead of falcon…
>>>>>>>
>>>>>>> I’ve never done typdefs before. Does this look right?
>>>>>>>
>>>>>>> /**
>>>>>>> * @const
>>>>>>> * @typedef {jQuery}
>>>>>>> */
>>>>>>> var $ = jQuery;
>>>>>>>
>>>>>>> It’s currently:
>>>>>>> /**
>>>>>>> * @const
>>>>>>> */
>>>>>>> var $ = jQuery;
>>>>>>>
>>>>>>> On Apr 21, 2016, at 9:25 AM, OmPrakash Muppirala
>>>>>>> <bigosmallm@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I think this is what you are looking for?
>>>>>>>> : flex-falcon\externs\jquery\externs\jquery-1.9.js
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Om
>>>>>>>>
>>>>>>>> On Wed, Apr 20, 2016 at 11:21 PM, Harbs <harbs.lists@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> I’m looking for where the jQuery definitions are and
I can’t seem to
>>>>>>>>> find
>>>>>>>>> it.
>>>>>>>>>
>>>>>>>>> On Apr 21, 2016, at 3:17 AM, Alex Harui <aharui@adobe.com>
wrote:
>>>>>>>>>
>>>>>>>>>> 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.
>>>>>>>>>>
>>>>>>>>>> -Alex
>>>>>>>>>>
>>>>>>>>>> On 4/20/16, 4:13 PM, "Harbs" <harbs.lists@gmail.com>
wrote:
>>>>>>>>>>
>>>>>>>>>>> Replacing “$” with “jQuery” makes the
warnings go away. Why would
>>>>>>>>>>> “$” be
>>>>>>>>>>> different than “jQuery”? It sounds to me
like a bug in the
>>>>>>>>>>> definitions.
>>>>>>>>>>>
>>>>>>>>>>> jQuery always returns a JQuery object which has
many defined
>>>>>>>>>>> methods.
>>>>>>>>> One
>>>>>>>>>>> of those is attr.
>>>>>>>>>>>
>>>>>>>>>>> On Apr 21, 2016, at 1:50 AM, Alex Harui <aharui@adobe.com>
wrote:
>>>>>>>>>>>
>>>>>>>>>>>> IMO, this is why Jquery is painful for strong
typing.
>>>>>>>>>>>>
>>>>>>>>>>>> I think you may need to do casting:
>>>>>>>>>>>>
>>>>>>>>>>>> ($("#topcoat") as Whatever).attr(..)
>>>>>>>>>>>>
>>>>>>>>>>>> Where Whatever is a "type" that has an attr
function.
>>>>>>>>>>>>
>>>>>>>>>>>> And you may need to use @flexjsignorecoercion
or other compiler
>>>>>>>>>>>> options
>>>>>>>>>>>> to
>>>>>>>>>>>> not actually do the "as" test in the JS output.
>>>>>>>>>>>>
>>>>>>>>>>>> Good luck,
>>>>>>>>>>>> -Alex
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 4/20/16, 3:46 PM, "Harbs" <harbs.lists@gmail.com>
wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Here’s an example:
>>>>>>>>>>>>> $("#topcoat").attr("href",
>>>>>>>>>>>>> "css/topcoat-desktop-lightlight.min.css");
>>>>>>>>>>>>>
>>>>>>>>>>>>> It looks like “$” is defined as an
object.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Here’s the exact warnings I’m getting:
>>>>>>>>>>>>>
>>>>>>>>>>>>> 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
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> $("#topcoat").attr("href","css/topcoat-desktop-lightlight.min.css
>>>>>>>>>>>>> ");
>>>>>>>>> at
>>>>>>>>>>>>> line 43 column
>>>>>>>>>>>>> 5. ThemeManager.as /MyExtension/src/com/unhurdle
  Unknown Flash
>>>>>>>>> Problem
>>>>>>>>>>>>>
>>>>>>>>>>>>> And yes, js/libs/jquery.swc is included.
If I remove it, I get
>>>>>>>>>>>>> an
>>>>>>>>> error
>>>>>>>>>>>>> that “$” is not defined instead of
a warning.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Apr 21, 2016, at 1:39 AM, Alex Harui
<aharui@adobe.com>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 4/20/16, 3:34 PM, "Harbs" <harbs.lists@gmail.com>
wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Does anyone know if there’s
a way to get FDT to not flag
>>>>>>>>>>>>>>> JQuery
>>>>>>>>>>>>>>> expressions with “could not
resolve variable” and "Maybe
>>>>>>>>>>>>>>> invoke a
>>>>>>>>> non
>>>>>>>>>>>>>>> function” warnings?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> What kind of expressions result in
this output?  Are you sure
>>>>>>>>>>>>>> you
>>>>>>>>> have
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> jquery.swc from the externs on the
-external-library-path?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> -Alex
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>


Mime
View raw message