You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Serkan Taş <se...@likyateknoloji.com> on 2020/03/08 10:03:15 UTC

MXAdvancedDataGridItemRenderer XML parsing

changed subject...


Data is binding is ok after the push for now Alex but xml navigation 
still have issues.





Can not get the child node :



Although xml has the node :



8.03.2020 10:09 tarihinde Alex Harui yazdı:
>
> I just pushed some changes that might help.  Binding wasn’t working in 
> s:MXAdvancedDataGridItemRenderer
>
> -Alex
>
>


Re: MXAdvancedDataGridItemRenderer XML parsing

Posted by Serkan Taş <se...@likyateknoloji.com>.
Addition to the case below :

The ImageContainer.resolveStatus(data) is called




before the binding.



8.03.2020 13:03 tarihinde Serkan Taş yazdı:
> changed subject...
>
>
> Data is binding is ok after the push for now Alex but xml navigation 
> still have issues.
>
>
>
>
>
> Can not get the child node :
>
>
>
> Although xml has the node :
>
>
>
> 8.03.2020 10:09 tarihinde Alex Harui yazdı:
>>
>> I just pushed some changes that might help.  Binding wasn’t working 
>> in s:MXAdvancedDataGridItemRenderer
>>
>> -Alex
>>
>>
>


Re: MXAdvancedDataGridItemRenderer XML parsing

Posted by Serkan Taş <se...@likyateknoloji.com>.
Just to remind, may be lost during thread....

9.03.2020 22:15 tarihinde Serkan Taş yazdı:
> Forgot to add the note : No exception thrown anyway for the null data.
>
> 9.03.2020 22:12 tarihinde Serkan Taş yazdı:
>> 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();
>>
>> statuImageList.addItem(clock1)
>>                 statuImageList.addItem(kilit)
>>                 statuImageList.addItem(kosu2)
>>                 statuImageList.addItem(ok2)
>>                 statuImageList.addItem(error)
>>                 statuImageList.addItem(timeout)
>>                 statuImageList.addItem(skip)
>>                 statuImageList.addItem(stop)
>>                 statuImageList.addItem(pause)
>>                 statuImageList.addItem(disabled)
>>                 statuImageList.addItem(warning)
>>
>> 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.
>>
>> Serkan.
>>
>> 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.
>>>
>>> HTH,
>>>
>>> -Alex
>>>
>>>
>


Re: MXAdvancedDataGridItemRenderer XML parsing

Posted by Serkan Taş <se...@likyateknoloji.com>.
Forgot to add the note : No exception thrown anyway for the null data.

9.03.2020 22:12 tarihinde Serkan Taş yazdı:
> 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();
>
> statuImageList.addItem(clock1)
>                 statuImageList.addItem(kilit)
>                 statuImageList.addItem(kosu2)
>                 statuImageList.addItem(ok2)
>                 statuImageList.addItem(error)
>                 statuImageList.addItem(timeout)
>                 statuImageList.addItem(skip)
>                 statuImageList.addItem(stop)
>                 statuImageList.addItem(pause)
>                 statuImageList.addItem(disabled)
>                 statuImageList.addItem(warning)
>
> 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.
>
> Serkan.
>
> 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.
>>
>> HTH,
>>
>> -Alex
>>
>>


Re: MXAdvancedDataGridItemRenderer XML parsing

Posted by Serkan Taş <se...@likyateknoloji.com>.
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();

statuImageList.addItem(clock1)
                 statuImageList.addItem(kilit)
                 statuImageList.addItem(kosu2)
                 statuImageList.addItem(ok2)
                 statuImageList.addItem(error)
                 statuImageList.addItem(timeout)
                 statuImageList.addItem(skip)
                 statuImageList.addItem(stop)
                 statuImageList.addItem(pause)
                 statuImageList.addItem(disabled)
                 statuImageList.addItem(warning)

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.

Serkan.

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.
>
> HTH,
>
> -Alex
>
>

Re: MXAdvancedDataGridItemRenderer XML parsing

Posted by Alex Harui <ah...@adobe.com>.
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.

HTH,
-Alex

From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Sunday, March 8, 2020 at 11:19 AM
To: "users@royale.apache.org" <us...@royale.apache.org>, Greg Dove <gr...@gmail.com>
Subject: Re: MXAdvancedDataGridItemRenderer XML parsing

Hi Greg, I was looking to the mail again and realized that I missed the suggestion. I was just working on that.

Casting worked well
from

var statu:int = data.visualParams.statu;

to

var statu:int = XML(data).visualParams.statu;

BUT

1.  the sequence of function call is still a problem. Details in the previous mail.
2. Image is not displayed :

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

js ouput :

[cid:image001.png@01D5F59B.D44ADE30]

view :

[cid:image002.png@01D5F59B.D44ADE30]


Thanks,
Serkan

8.03.2020 21:14 tarihinde Greg Dove yazdı:

Hi Serkan, I think Alex already made suggestions about this type of thing, although I'm not sure if it was for that specific method.

The compiler needs to know that it is XML in actionscript to generate the correct code, because the js runtime does not know.

if the method signature cannot be changed to (data:XML) instead of (data:Object)

Then I expect you need to cast inside the function
  var status:int /*int is only a guess*/ = XML(data).visualParams.statu

or
  var status:int /*int is only a guess*/ = (data as XML).visualParams.statu


On Sun, Mar 8, 2020 at 11:03 PM Serkan Taş <se...@likyateknoloji.com>> wrote:
changed subject...


Data is binding is ok after the push for now Alex but xml navigation still have issues.

[cid:image003.png@01D5F59B.D44ADE30]



Can not get the child node :

[cid:image004.png@01D5F59B.D44ADE30]

Although xml has the node :

[cid:image005.png@01D5F59B.D44ADE30]
8.03.2020 10:09 tarihinde Alex Harui yazdı:
I just pushed some changes that might help.  Binding wasn’t working in s:MXAdvancedDataGridItemRenderer

-Alex






Re: MXAdvancedDataGridItemRenderer XML parsing

Posted by Serkan Taş <se...@likyateknoloji.com>.
Hi Greg, I was looking to the mail again and realized that I missed the 
suggestion. I was just working on that.

Casting worked well
from

var statu:int = data.visualParams.statu;

to

var statu:int = XML(data).visualParams.statu;

BUT

1.  the sequence of function call is still a problem. Details in the 
previous mail.
2. Image is not displayed :

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

js ouput :



view :




Thanks,
Serkan


8.03.2020 21:14 tarihinde Greg Dove yazdı:
>
> Hi Serkan, I think Alex already made suggestions about this type of 
> thing, although I'm not sure if it was for that specific method.
>
> The compiler needs to know that it is XML in actionscript to generate 
> the correct code, because the js runtime does not know.
>
> if the method signature cannot be changed to (data:XML) instead of 
> (data:Object)
>
> Then I expect you need to cast inside the function
>   var status:int /*int is only a guess*/ = XML(data).visualParams.statu
>
> or
>   var status:int /*int is only a guess*/ = (data as 
> XML).visualParams.statu
>
>
> On Sun, Mar 8, 2020 at 11:03 PM Serkan Taş 
> <serkan.tas@likyateknoloji.com <ma...@likyateknoloji.com>> 
> wrote:
>
>     changed subject...
>
>
>     Data is binding is ok after the push for now Alex but xml
>     navigation still have issues.
>
>
>
>
>
>     Can not get the child node :
>
>
>
>     Although xml has the node :
>
>
>
>     8.03.2020 10:09 tarihinde Alex Harui yazdı:
>>
>>     I just pushed some changes that might help.  Binding wasn’t
>>     working in s:MXAdvancedDataGridItemRenderer
>>
>>     -Alex
>>
>>
>


Re: MXAdvancedDataGridItemRenderer XML parsing

Posted by Greg Dove <gr...@gmail.com>.
Hi Serkan, I think Alex already made suggestions about this type of thing,
although I'm not sure if it was for that specific method.

The compiler needs to know that it is XML in actionscript to generate the
correct code, because the js runtime does not know.

if the method signature cannot be changed to (data:XML) instead of
(data:Object)

Then I expect you need to cast inside the function
  var status:int /*int is only a guess*/ = XML(data).visualParams.statu

or
  var status:int /*int is only a guess*/ = (data as
XML).visualParams.statu


On Sun, Mar 8, 2020 at 11:03 PM Serkan Taş <se...@likyateknoloji.com>
wrote:

> changed subject...
>
>
> Data is binding is ok after the push for now Alex but xml navigation still
> have issues.
>
>
>
>
>
> Can not get the child node :
>
>
>
> Although xml has the node :
>
>
>
> 8.03.2020 10:09 tarihinde Alex Harui yazdı:
>
> I just pushed some changes that might help.  Binding wasn’t working in
> s:MXAdvancedDataGridItemRenderer
>
>
>
> -Alex
>
>
>
>
>