Some Metadata is kept in the output, but events probably aren't.

One issue to consider are whether a container of beads should be have
metadata about the events dispatched by its beads since the changing of
beads could make that metadata incorrect.  IMO, this has been a problem in
Flex forever.  Maybe a smarter IDE could figure out what beads are
currently in play and aggregate allowable events from those beads'
metadata someday.

Another issue to consider is cross-platform.  A component may not be able
to dispatch the events listed in metadata on all platforms.

Also consider that on JS, events probably have to be propagated from the
wrapped element to the strand so there is cost there.

It is hopefully easy enough for anyone who wants to get an event that
isn't already in metadata, to subclass, add the metadata and any wiring.

My 2 cents,
-Alex

On 10/30/17, 11:24 AM, "Harbs" <harbs.li...@gmail.com> wrote:

>I’m not talking about adding events. I’m talking about adding metadata
>for *existing events* so they could be addressed in MXML.
>
>
>> On Oct 30, 2017, at 8:18 PM, Piotr Zarzycki <piotrzarzyck...@gmail.com>
>>wrote:
>> 
>> If you decide to add event that's fine with me. :) It is just the
>>matter of
>> thinking about those Basic components from my sight. I have started to
>>look
>> at them as something which should be closer to HTML than to the old Flex
>> world. Rest of the features should be provided by beads - if it is
>>possible
>> or by Express.
>> 
>> The exception could be and MDL from that which I would like to extend,
>>but
>> here I can think about those components as they are Express right now.
>> 
>> Piotr
>> 
>> 
>> 2017-10-30 19:07 GMT+01:00 Harbs <harbs.li...@gmail.com>:
>> 
>>> Why? Unless it adds overhead, it seems to me like any event that can be
>>> added using addEventListener() should be addressable using MXML.
>>> 
>>> I’m just not sure from a technical perspective whether the MXML meta
>>>tags
>>> add overhead if not used.
>>> 
>>>> On Oct 30, 2017, at 8:02 PM, Piotr Zarzycki
>>>><piotrzarzyck...@gmail.com>
>>> wrote:
>>>> 
>>>> Hi Harbs,
>>>> 
>>>> Some time ago there were discussion on Flex Dev which makes me realize
>>> that
>>>> we should add event tags as long as they are reflecting some native
>>>>HTML
>>>> api, unless we are in express. For example we are using in many places
>>>> "change" event which is I believe quite common in JS world, but I
>>>>would
>>>> avoid any additional custom one. In the other world Let's answer to
>>>>the
>>>> question in following case - Does "img" in HTML world have "load"
>>>>event ?
>>>> 
>>>> Piotr
>>>> 
>>>> 
>>>> 2017-10-30 18:47 GMT+01:00 Harbs <harbs.li...@gmail.com>:
>>>> 
>>>>> This does raise a good question:
>>>>> 
>>>>> Should we be adding MXML meta tags for all supported events? It seems
>>> like
>>>>> a desirable thing to have, and there are currently very few event
>>>>>tags.
>>> I’m
>>>>> not clear on whether the meta-tags effect the end result of code
>>>>>size.
>>>>> 
>>>>> Harbs
>>>>> 
>>>>>> On Oct 30, 2017, at 7:38 PM, GitBox <g...@apache.org> wrote:
>>>>>> 
>>>>>> justinmclean commented on issue #60: Image not removed when src set
>>>>>>to
>>>>> null
>>>>>> URL: 
>>>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
>>>>>>ub.com%2Fapache%2Froyale-asjs%2Fissues%2F60%23&data=02%7C01%7C%7Cd040
>>>>>>5ef4adc6485ba55208d51fc38b07%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7
>>>>>>C0%7C636449847130199355&sdata=GJ5cQmWUXSJyuYIcs2dn5UU%2BGtWVqy17xFbif
>>>>>>9Gknpc%3D&reserved=0
>>>>> issuecomment-340524197
>>>>>> 
>>>>>> 
>>>>>> This code fails to compile:
>>>>>> ```
>>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>> <js:Application
>>>>>>xmlns:fx="https://na01.safelinks.protection.outlook.com/?url=http%3A%
>>>>>>2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7C%7Cd0405ef4adc6485ba55
>>>>>>208d51fc38b07%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364498471
>>>>>>30355609&sdata=h2%2BZE%2FtC5p0ZVuay%2B01WvZSF%2BSc7%2BUbqLFKdzAe4%2Bn
>>>>>>o%3D&reserved=0"
>>>>>>                 xmlns:js="library://ns.apache.org/royale/basic">
>>>>>> 
>>>>>>     <fx:Script><![CDATA[
>>>>>>         import org.apache.flex.events.IEventDispatcher;
>>>>>> 
>>>>>>         public function blankimage():void {
>>>>>>             image.visible = false;
>>>>>>             image.src =
>>>>>>"https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
>>>>>>.apache.org%2F&data=02%7C01%7C%7Cd0405ef4adc6485ba55208d51fc38b07%7Cf
>>>>>>a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636449847130355609&sdata=pn
>>>>>>iuBoujFMWxq1MjO1rmnLPHgMC6CzFPHl2HhXjOwhk%3D&reserved=0
>>> foundation/press/kit/
>>>>> poweredBy/Apache_PoweredBy.png";
>>>>>>         }
>>>>>>         public function showImage():void {
>>>>>>             image.visible = true;
>>>>>>         }
>>>>>>         ]]></fx:Script>
>>>>>> 
>>>>>>     <js:valuesImpl>
>>>>>>         <js:SimpleCSSValuesImpl/>
>>>>>>     </js:valuesImpl>
>>>>>> 
>>>>>>     <js:initialView>
>>>>>> 
>>>>>>         <js:View>
>>>>>>             <js:Container id="startPage" visible="true"
>>>>>>width="100%">
>>>>>>                 <js:beads>
>>>>>>                     <js:VerticalLayout />
>>>>>>                 </js:beads>
>>>>>>                 <js:Image id="image"
>>>>>>src="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2
>>>>>>Fwww.apache.org%2F&data=02%7C01%7C%7Cd0405ef4adc6485ba55208d51fc38b07
>>>>>>%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636449847130355609&sdat
>>>>>>a=pniuBoujFMWxq1MjO1rmnLPHgMC6CzFPHl2HhXjOwhk%3D&reserved=0
>>>>> foundation/press/kit/asf_logo_url.png" width="50%" height="50%"
>>>>> layoutNeeded="showImage()" />
>>>>>>                 <js:TextButton text="Blank" click="blankimage()" />
>>>>>>             </js:Container>
>>>>>>         </js:View>
>>>>>>     </js:initialView>
>>>>>> 
>>>>>> </js:Application>
>>>>>> ```
>>>>>> 
>>>>>> With this error:
>>>>>> ```
>>>>>> /Users/justinmclean/IdeaProjects/FlexJSTest/src/ImageBlank.mxml(26):
>>>>> col: 130 This attribute is unexpected. It will be ignored.
>>>>>> 
>>>>>>                 <js:Image id="image"
>>>>>>src="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2
>>>>>>Fwww.apache.org%2F&data=02%7C01%7C%7Cd0405ef4adc6485ba55208d51fc38b07
>>>>>>%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636449847130355609&sdat
>>>>>>a=pniuBoujFMWxq1MjO1rmnLPHgMC6CzFPHl2HhXjOwhk%3D&reserved=0
>>>>> foundation/press/kit/asf_logo_url.png" width="50%" height="50%"
>>>>> layoutNeeded="showImage()" />
>>>>>> ```
>>>>>> 
>>>>>> I assume the only way to do this would be to add a hard coded event
>>>>> listener manually like so?
>>>>>> 
>>>>>> ```
>>>>>>     <fx:Script><![CDATA[
>>>>>>         public function blankimage():void {
>>>>>>             image.visible = false;
>>>>>>             image.src =
>>>>>>"https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
>>>>>>.apache.org%2F&data=02%7C01%7C%7Cd0405ef4adc6485ba55208d51fc38b07%7Cf
>>>>>>a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636449847130355609&sdata=pn
>>>>>>iuBoujFMWxq1MjO1rmnLPHgMC6CzFPHl2HhXjOwhk%3D&reserved=0
>>> foundation/press/kit/
>>>>> poweredBy/Apache_PoweredBy.png";
>>>>>>             image.addEventListener("layoutNeeded", showImage);
>>>>>>         }
>>>>>> 
>>>>>>         public function showImage(event:Event):void {
>>>>>>             image.visible = true;
>>>>>>         }
>>>>>>         ]]></fx:Script>
>>>>>> ```
>>>>>> 
>>>>>> 
>>>>>> ----------------------------------------------------------------
>>>>>> This is an automated message from the Apache Git Service.
>>>>>> To respond to the message, please log on GitHub and use the
>>>>>> URL above to go to the specific comment.
>>>>>> 
>>>>>> For queries about this service, please contact Infrastructure at:
>>>>>> us...@infra.apache.org
>>>>>> 
>>>>>> 
>>>>>> With regards,
>>>>>> Apache Git Services
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> 
>>>> Piotr Zarzycki
>>>> 
>>>> mobile: +48 880 859 557
>>>> skype: zarzycki10
>>>> 
>>>> LinkedIn: 
>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.lin
>>>>kedin.com%2Fpiotrzarzycki&data=02%7C01%7C%7Cd0405ef4adc6485ba55208d51fc
>>>>38b07%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636449847130355609&s
>>>>data=Mhs%2F8uCEal%2F%2ByaWFrAPHoahv3fp7MaaCQ7ezLraU5WQ%3D&reserved=0
>>>> 
>>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpl.li
>>>>nkedin.com%2Fin%2Fpiotr-zarzycki-92a53552&data=02%7C01%7C%7Cd0405ef4adc
>>>>6485ba55208d51fc38b07%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364
>>>>49847130355609&sdata=K%2FVEqa3kVpSXeOppqc9JLQKnxRmGNI3bZNQ%2FHqEAKNo%3D
>>>>&reserved=0>
>>>> 
>>>> GitHub: 
>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub
>>>>.com%2Fpiotrzarzycki21&data=02%7C01%7C%7Cd0405ef4adc6485ba55208d51fc38b
>>>>07%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636449847130355609&sdat
>>>>a=mi12zf18eKrbGi30qfgZgGD9RRoPGGL%2BwAo1unRqnYc%3D&reserved=0
>>> 
>>> 
>> 
>> 
>> -- 
>> 
>> Piotr Zarzycki
>> 
>> mobile: +48 880 859 557
>> skype: zarzycki10
>> 
>> LinkedIn: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linke
>>din.com%2Fpiotrzarzycki&data=02%7C01%7C%7Cd0405ef4adc6485ba55208d51fc38b0
>>7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636449847130355609&sdata=M
>>hs%2F8uCEal%2F%2ByaWFrAPHoahv3fp7MaaCQ7ezLraU5WQ%3D&reserved=0
>> 
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpl.link
>>edin.com%2Fin%2Fpiotr-zarzycki-92a53552&data=02%7C01%7C%7Cd0405ef4adc6485
>>ba55208d51fc38b07%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364498471
>>30355609&sdata=K%2FVEqa3kVpSXeOppqc9JLQKnxRmGNI3bZNQ%2FHqEAKNo%3D&reserve
>>d=0>
>> 
>> GitHub: 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fpiotrzarzycki21&data=02%7C01%7C%7Cd0405ef4adc6485ba55208d51fc38b07%7
>>Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636449847130355609&sdata=mi12
>>zf18eKrbGi30qfgZgGD9RRoPGGL%2BwAo1unRqnYc%3D&reserved=0
>

Reply via email to