Fwd: Re: MXAdvancedDataGridItemRenderer XML parsing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Fwd: Re: MXAdvancedDataGridItemRenderer XML parsing

Serkan Taş

I tested the image and can say that as Alex told before the problem is with url parsing I guess.

For the images the url is not relative to the js files.

for here, the url is file:///images/clock1s.png

when manually edit the attribute than image is displayed in debug view :

-------- İletilmiş İleti --------
Konu: Re: MXAdvancedDataGridItemRenderer XML parsing
Tarih: Mon, 9 Mar 2020 22:20:11 +0300
Kimden: Serkan Taş [hidden email]
Kime: Greg Dove [hidden email]

Hi Greg, exactly they are strings, the path of the image:

<s:Image source="{ImageContainer.resolveStatus(data)}" toolTip="{ToolTipContainer.getToolTip(data) + ':' + mylabelFunc(data)}"/>

So the Image is the question here.

I will try your suggestion.

9.03.2020 22:16 tarihinde Greg Dove yazdı:

Serkan, if they are actually Strings and not Classes, then you should try changing the resolveStatus to 

public static function resolveStatus(data:Object):String{  
and later:
return statuImageList.getItemAt(statu) as String;  

On Tue, Mar 10, 2020 at 8:13 AM Serkan Taş <[hidden email]> wrote:
Hi Alex,

In first stop it is null but I sent you the result of the second stop after resuming the execution.

So to make it clear here is the first call and call stack:

For the image display as far as i know the images are loaded from url as a class :

Here is the code pieces for displaying sample clock image.

private static var _clock1:String = '/images/clock1.png';

                statuImageList = new ArrayList();

for example to get clock1 image        

public static function get clock1():String
            return _clock1;

through function :

        public static function resolveStatus(data:Object):Class {
            var statu:int = XML(data).visualParams.statu;
            // Alert.show("Vparams : " + data.visualParams);
            // Alert.show("statu:" + statu + " image:" + imageList.getItemAt(statu));
            return statuImageList.getItemAt(statu) as Class;

I'am not sure if they are replaceable with SVG or Unicode symbols technically. But they are used just to make the gui more user friendly and to have better look&feel.

And hey are fıunctional, mean you can click on the images to send actions about the jobs : to stop suspend or run for example.


9.03.2020 08:49 tarihinde Alex Harui yazdı:

Hi Serkan,


Looks like the call sequence is fine.  The “data” is not null in the screenshot below.  In your previous email, it may be that some other binding logic ran that expression early, but that should be a caught exception.  If that isn’t true, show us the call stack for that exception.


But given no image is being displayed, further investigation is needed to determine the problem.  What is ImageContainer?  What does it contain?  The bit of JS code you attached  looks like it might have contained embedded images.  Royale doesn’t currently support embedded images.  If the Flex app was using embedded images, let’s have a discussion about what to replace it with.  It will depend on what the images are.  If they can be replaced by SVG or Unicode symbols that will be best.