Hi Greg,

I tested the XMLList version it looks like can work after the issues with menu resolved.

I can access the index :

this.filterMenuData[1] and so.

If it is planned to support the same approach as flex I may create and issue. If not than I can use XMLLlist

Thanks,
Serkan


28.04.2020 11:33 tarihinde serkan yazdı:
Hi Greg,

It is just same as as in flex.

Do you advise me to convert to XMLList ?

Thanks,
Serkan

28.04.2020 08:56 tarihinde Greg Dove yazdı:

if it is XML, then it index [1] should not work. Only index [0] is valid for an XML instance;
when you access [0] on an XML instance it returns the same instance.

var xml:XML = <root><child/></root>

trace(xml[1])//undefined
trace(xml[0])//same as xml.toString()

If it is an XMLList then it can have index values greater than zero.


On Tue, Apr 28, 2020 at 4:19 PM serkan <[email protected] <mailto:[email protected]>> wrote:

    Hİ,

    The source below has the exception. Similar one was resolved for
    XMLList with https://github.com/apache/royale-asjs/issues/545

    The error line :

    function (value) { this.filterMenuData[1].setAttribute('label',
    value);},

    note : for the index 0 it works.

    Thanks,
    Serkan



    <?xml version="1.0" encoding="latin5" ?>

    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
    <http://ns.adobe.com/mxml/2009>
                   xmlns:s="library://ns.apache.org/royale/spark
    <http://ns.apache.org/royale/spark>"
                   xmlns:mx="library://ns.apache.org/royale/mx
    <http://ns.apache.org/royale/mx>"
                   height="288" width="179"
                   >
        <fx:Metadata>
            [ResourceBundle("messages")]
        </fx:Metadata>

        <fx:Script>
            <![CDATA[
            ]]>
        </fx:Script>

        <fx:Declarations>
            <fx:XML format="e4x" id="filterMenuData">
                <menuitem
    label="{resourceManager.getString('messages', 'statusFilter')}"
    id="statusFilter">
                    <menuitem
    label="{resourceManager.getString('messages', 'listAll')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'readyFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'waitingFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'workingFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'successfulFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'failedFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'timeoutFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'skippedFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'stoppedFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'pausedFilter')}"/>
                    <menuitem
    label="{resourceManager.getString('messages', 'disabledFilter')}"/>
                </menuitem>
            </fx:XML>
        </fx:Declarations>

    </s:Application>




Reply via email to