Hola,
Setting up a detail form, where I have a jewel image component, I have noticed 
that when a "" (empty string) or null is assigned to the src property, the 
image is not emptied..
I have detected the origin of the problem and I present a possible solution, to 
see how you see it.

When the url / src is "" or null it does not enter through the if (_model.url) 
and consequently it does not call applyImageDate and the img is not updated:

[cid:[email protected]]

[cid:[email protected]]

If when the url is "" or null we directly call the applyImageData function 
everything works perfectly (commented lines //)

[cid:[email protected]]

If in ImageViewBase.as we changed the code:

        protected function handleUrlChange(event:Event):void
        {
            COMPILE::SWF
            {
                if (_model.url) {
                    setupLoader();
                    loader.load(new URLRequest(_model.url));
                }
            }
            COMPILE::JS
            {
                if (_model.url) {
                    setupLoader();
                    (host as IImage).applyImageData(_model.url);
                }
            }
        }

For this other, It would be correct?

            COMPILE::JS
            {
                if (_model.url)
                    setupLoader();
                (host as IImage).applyImageData(_model.url);

            }

I haven't tested it for SWC but I think it might be feasible too. (In my Flex 
application it works when I assign a null if it empties the image)
As you see?

Hiedra.

Reply via email to