Xml list selection in IE11

0 favourites
  • 9 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Hi, I played around with the Xml example in c2 and was just about to share the work in the Capx Example section. When I discovered, for unknown reasons, list selection won't work in IE 11. We can't have this not to work. What might the problem be?!

    In the Capx I tried the change "on selection changed" to "on clicked" and even "system -> Every tick". But that's not it.


  • You might need to loop through the sub-nodes of "book" and append each value to your text object.

  • I thought about that, but what if you have hundreds of books, swords and other stuff you want listed. That would not be an option. My example works fine in both Chrome and Firefox. I want it to be available to IE users and highly customizable so it earns it's place in the Capx Example section.

    ramones: I guess I have to bury IE in a pet cemetery <img src="smileys/smiley17.gif" border="0" align="middle" />

  • IE11 seems to support 'On selection changed' just fine. The first text box updates so the trigger is working. It looks like IE11 doesn't understand that particular piece of XPath.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Just read this: w3schools.com/xpath/xpath_syntax.asp. Do not paste the link, I quote: "IE5 and later has Implemented That [0] Should be the first node, but According To the W3C standard it should have been [1]!"

    So I guess you are right IE has not implemented XPath properly >.<

    IE is now a dead end. I will add a "do not use IE" warning before I share the capx, still might be useful.


  • You could work around it by detecting MSIE (or Trident for IE11) in the user agent string and offsetting the index accordingly.

  • This is what I meant by looping through the child nodes:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/xmllist.PNG" border="0" />

    That works in IE11 so I guess the index starts at 1 there.

  • Almost done!

    Let's say you have weapons or armor instead of books and you want to view statistics in different text boxes. ramones / * (black magic) presented the last node in one text box. In the second you can show any node.

    Thanks plenty for all your help!

    Download and test the example at the top of this thread.

  • It's only showing the last node because you're using 'set text' instead of 'append' so it's overwriting all but the last node.

    Here's one way to show different stats in different text boxes...

    Give each text box a 'name' variable that matches each node name and then just loop through the nodes, pick the text object with the matching name and set it's value.

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/xmlExample.PNG" border="0">

    xmlExampleEdit.capx (r156)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)