You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Harbs <ha...@gmail.com> on 2016/09/12 08:19:01 UTC

[FlexJS]Image

The Image component has the following code which did not make a lot of sense to me considering it’s JS-only:

            model = new
                ImageModel();
            
            addBead(new
                ImageView());

When trying to figure this out, we realized that this should be instantiated in UIBase in a more generic fashion. Are we correct in assuming that this is legacy code and should be removed?

Harbs

AW: [FlexJS]Image

Posted by Christofer Dutz <ch...@c-ware.de>.
Ok,


I think I found the problem. By removing the reference to ImageView and ImageModel, the compiler now no-longer adds the JS for both to the JS output. This is then missing later down the stream. I added both to the basic-manifest which made them part of the lib again. Now the Cordova example is building nicely again.


I'm currently running the full build suite including examples ... as soon as that passes, I'll commit my changes.


Chris

________________________________
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Dienstag, 13. September 2016 10:19:38
An: dev@flex.apache.org
Betreff: AW: [FlexJS]Image

I think those last changes broke the framework build:

https://builds.apache.org/view/E-G/view/Flex/job/FlexJS%20Framework%20(maven)/255/console


Chris

________________________________
Von: Harbs <ha...@gmail.com>
Gesendet: Montag, 12. September 2016 20:11:18
An: dev@flex.apache.org
Betreff: Re: [FlexJS]Image

Thanks.

I’ll clean up BinaryImage as well when I have the opportunity.

On Sep 12, 2016, at 8:35 PM, Peter Ent <pe...@adobe.com> wrote:

> I updated the defaults.css in the HTML project to include the Image's
> model and view for SWF and JS and removed this code fragment.
> ―peter
>
> On 9/12/16, 10:01 AM, "Peter Ent" <pe...@adobe.com> wrote:
>
>> I had to go back and look into it all again. This code is necessary. The
>> source property is actually stored in the image's model. When this
>> property changes, the ImageView bead picks it up and sets it into the
>> <img> element, so the ImageView bead is also necessary; the Image needs
>> the view in order to detect and handle changes in the model.
>>
>> However, I think the real change should go into the defaults.css file.
>> Right now, the Image's model and view beads are set only for the Flash
>> side, which is why the JS side is explicitly creating them. If the
>> defaults.css were changed to be universal, then the code you see for the
>> JS side would not be needed.
>>
>> ―peter
>>
>>
>>
>> On 9/12/16, 9:31 AM, "Peter Ent" <pe...@adobe.com> wrote:
>>
>>> I'll have to see what happens when these lines are removed. The Flash
>>> side
>>> nearly always has model and view beads to build the components but the JS
>>> side may not have a view bead since the element (i.e., <img>) is the
>>> view.
>>> Meaning, the Flash and JS versions aren't always symmetric. I'm not
>>> really
>>> sure why the JS side would need a view. It may be that I was
>>> experimenting
>>> with making both sides always follow the same pattern and just checked in
>>> that code accidentally.
>>>
>>> Peter Ent
>>> Adobe Systems/Apache Flex Project
>>>
>>> On 9/12/16, 4:19 AM, "Harbs" <ha...@gmail.com> wrote:
>>>
>>>> The Image component has the following code which did not make a lot of
>>>> sense to me considering it¹s JS-only:
>>>>
>>>>           model = new
>>>>               ImageModel();
>>>>
>>>>           addBead(new
>>>>               ImageView());
>>>>
>>>> When trying to figure this out, we realized that this should be
>>>> instantiated in UIBase in a more generic fashion. Are we correct in
>>>> assuming that this is legacy code and should be removed?
>>>>
>>>> Harbs
>>>
>>
>


AW: [FlexJS]Image

Posted by Christofer Dutz <ch...@c-ware.de>.
I think those last changes broke the framework build:

https://builds.apache.org/view/E-G/view/Flex/job/FlexJS%20Framework%20(maven)/255/console


Chris

________________________________
Von: Harbs <ha...@gmail.com>
Gesendet: Montag, 12. September 2016 20:11:18
An: dev@flex.apache.org
Betreff: Re: [FlexJS]Image

Thanks.

I’ll clean up BinaryImage as well when I have the opportunity.

On Sep 12, 2016, at 8:35 PM, Peter Ent <pe...@adobe.com> wrote:

> I updated the defaults.css in the HTML project to include the Image's
> model and view for SWF and JS and removed this code fragment.
> ―peter
>
> On 9/12/16, 10:01 AM, "Peter Ent" <pe...@adobe.com> wrote:
>
>> I had to go back and look into it all again. This code is necessary. The
>> source property is actually stored in the image's model. When this
>> property changes, the ImageView bead picks it up and sets it into the
>> <img> element, so the ImageView bead is also necessary; the Image needs
>> the view in order to detect and handle changes in the model.
>>
>> However, I think the real change should go into the defaults.css file.
>> Right now, the Image's model and view beads are set only for the Flash
>> side, which is why the JS side is explicitly creating them. If the
>> defaults.css were changed to be universal, then the code you see for the
>> JS side would not be needed.
>>
>> ―peter
>>
>>
>>
>> On 9/12/16, 9:31 AM, "Peter Ent" <pe...@adobe.com> wrote:
>>
>>> I'll have to see what happens when these lines are removed. The Flash
>>> side
>>> nearly always has model and view beads to build the components but the JS
>>> side may not have a view bead since the element (i.e., <img>) is the
>>> view.
>>> Meaning, the Flash and JS versions aren't always symmetric. I'm not
>>> really
>>> sure why the JS side would need a view. It may be that I was
>>> experimenting
>>> with making both sides always follow the same pattern and just checked in
>>> that code accidentally.
>>>
>>> Peter Ent
>>> Adobe Systems/Apache Flex Project
>>>
>>> On 9/12/16, 4:19 AM, "Harbs" <ha...@gmail.com> wrote:
>>>
>>>> The Image component has the following code which did not make a lot of
>>>> sense to me considering it¹s JS-only:
>>>>
>>>>           model = new
>>>>               ImageModel();
>>>>
>>>>           addBead(new
>>>>               ImageView());
>>>>
>>>> When trying to figure this out, we realized that this should be
>>>> instantiated in UIBase in a more generic fashion. Are we correct in
>>>> assuming that this is legacy code and should be removed?
>>>>
>>>> Harbs
>>>
>>
>


Re: [FlexJS]Image

Posted by Harbs <ha...@gmail.com>.
Thanks.

I’ll clean up BinaryImage as well when I have the opportunity.

On Sep 12, 2016, at 8:35 PM, Peter Ent <pe...@adobe.com> wrote:

> I updated the defaults.css in the HTML project to include the Image's
> model and view for SWF and JS and removed this code fragment.
> ―peter
> 
> On 9/12/16, 10:01 AM, "Peter Ent" <pe...@adobe.com> wrote:
> 
>> I had to go back and look into it all again. This code is necessary. The
>> source property is actually stored in the image's model. When this
>> property changes, the ImageView bead picks it up and sets it into the
>> <img> element, so the ImageView bead is also necessary; the Image needs
>> the view in order to detect and handle changes in the model.
>> 
>> However, I think the real change should go into the defaults.css file.
>> Right now, the Image's model and view beads are set only for the Flash
>> side, which is why the JS side is explicitly creating them. If the
>> defaults.css were changed to be universal, then the code you see for the
>> JS side would not be needed.
>> 
>> ―peter
>> 
>> 
>> 
>> On 9/12/16, 9:31 AM, "Peter Ent" <pe...@adobe.com> wrote:
>> 
>>> I'll have to see what happens when these lines are removed. The Flash
>>> side
>>> nearly always has model and view beads to build the components but the JS
>>> side may not have a view bead since the element (i.e., <img>) is the
>>> view.
>>> Meaning, the Flash and JS versions aren't always symmetric. I'm not
>>> really
>>> sure why the JS side would need a view. It may be that I was
>>> experimenting
>>> with making both sides always follow the same pattern and just checked in
>>> that code accidentally.
>>> 
>>> Peter Ent
>>> Adobe Systems/Apache Flex Project
>>> 
>>> On 9/12/16, 4:19 AM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> The Image component has the following code which did not make a lot of
>>>> sense to me considering it¹s JS-only:
>>>> 
>>>>           model = new
>>>>               ImageModel();
>>>> 
>>>>           addBead(new
>>>>               ImageView());
>>>> 
>>>> When trying to figure this out, we realized that this should be
>>>> instantiated in UIBase in a more generic fashion. Are we correct in
>>>> assuming that this is legacy code and should be removed?
>>>> 
>>>> Harbs
>>> 
>> 
> 


Re: [FlexJS]Image

Posted by Peter Ent <pe...@adobe.com>.
I updated the defaults.css in the HTML project to include the Image's
model and view for SWF and JS and removed this code fragment.
―peter

On 9/12/16, 10:01 AM, "Peter Ent" <pe...@adobe.com> wrote:

>I had to go back and look into it all again. This code is necessary. The
>source property is actually stored in the image's model. When this
>property changes, the ImageView bead picks it up and sets it into the
><img> element, so the ImageView bead is also necessary; the Image needs
>the view in order to detect and handle changes in the model.
>
>However, I think the real change should go into the defaults.css file.
>Right now, the Image's model and view beads are set only for the Flash
>side, which is why the JS side is explicitly creating them. If the
>defaults.css were changed to be universal, then the code you see for the
>JS side would not be needed.
>
>―peter
>
>
>
>On 9/12/16, 9:31 AM, "Peter Ent" <pe...@adobe.com> wrote:
>
>>I'll have to see what happens when these lines are removed. The Flash
>>side
>>nearly always has model and view beads to build the components but the JS
>>side may not have a view bead since the element (i.e., <img>) is the
>>view.
>>Meaning, the Flash and JS versions aren't always symmetric. I'm not
>>really
>>sure why the JS side would need a view. It may be that I was
>>experimenting
>>with making both sides always follow the same pattern and just checked in
>>that code accidentally.
>>
>>Peter Ent
>>Adobe Systems/Apache Flex Project
>>
>>On 9/12/16, 4:19 AM, "Harbs" <ha...@gmail.com> wrote:
>>
>>>The Image component has the following code which did not make a lot of
>>>sense to me considering it¹s JS-only:
>>>
>>>            model = new
>>>                ImageModel();
>>>            
>>>            addBead(new
>>>                ImageView());
>>>
>>>When trying to figure this out, we realized that this should be
>>>instantiated in UIBase in a more generic fashion. Are we correct in
>>>assuming that this is legacy code and should be removed?
>>>
>>>Harbs
>>
>


Re: [FlexJS]Image

Posted by Peter Ent <pe...@adobe.com>.
I had to go back and look into it all again. This code is necessary. The
source property is actually stored in the image's model. When this
property changes, the ImageView bead picks it up and sets it into the
<img> element, so the ImageView bead is also necessary; the Image needs
the view in order to detect and handle changes in the model.

However, I think the real change should go into the defaults.css file.
Right now, the Image's model and view beads are set only for the Flash
side, which is why the JS side is explicitly creating them. If the
defaults.css were changed to be universal, then the code you see for the
JS side would not be needed.

―peter



On 9/12/16, 9:31 AM, "Peter Ent" <pe...@adobe.com> wrote:

>I'll have to see what happens when these lines are removed. The Flash side
>nearly always has model and view beads to build the components but the JS
>side may not have a view bead since the element (i.e., <img>) is the view.
>Meaning, the Flash and JS versions aren't always symmetric. I'm not really
>sure why the JS side would need a view. It may be that I was experimenting
>with making both sides always follow the same pattern and just checked in
>that code accidentally.
>
>Peter Ent
>Adobe Systems/Apache Flex Project
>
>On 9/12/16, 4:19 AM, "Harbs" <ha...@gmail.com> wrote:
>
>>The Image component has the following code which did not make a lot of
>>sense to me considering it¹s JS-only:
>>
>>            model = new
>>                ImageModel();
>>            
>>            addBead(new
>>                ImageView());
>>
>>When trying to figure this out, we realized that this should be
>>instantiated in UIBase in a more generic fashion. Are we correct in
>>assuming that this is legacy code and should be removed?
>>
>>Harbs
>


Re: [FlexJS]Image

Posted by Peter Ent <pe...@adobe.com>.
I'll have to see what happens when these lines are removed. The Flash side
nearly always has model and view beads to build the components but the JS
side may not have a view bead since the element (i.e., <img>) is the view.
Meaning, the Flash and JS versions aren't always symmetric. I'm not really
sure why the JS side would need a view. It may be that I was experimenting
with making both sides always follow the same pattern and just checked in
that code accidentally.

Peter Ent
Adobe Systems/Apache Flex Project

On 9/12/16, 4:19 AM, "Harbs" <ha...@gmail.com> wrote:

>The Image component has the following code which did not make a lot of
>sense to me considering it¹s JS-only:
>
>            model = new
>                ImageModel();
>            
>            addBead(new
>                ImageView());
>
>When trying to figure this out, we realized that this should be
>instantiated in UIBase in a more generic fashion. Are we correct in
>assuming that this is legacy code and should be removed?
>
>Harbs