There is a function that returns true when a given string is NOT a number. It's not wrapped in any System expression so you'll have to use the Browser.ExecJS expression.
Browser.ExecJS("!isNaN(""" & yourVar & """);")[/code:1zas59qt] This will return 1 if yourVar is a valid javascript number.
I think the XML plugin expect your root node to be in the null namespace.
Develop games in your browser. Powerful, performant & highly capable.
I tried using an iframe to print the resulting canvas snapshot, and it seems to be working in Chrome.
Use the "On canvas snapshot" trigger and add the following executeJS :
"var iframe = document.getElementById(""iframe""); if(!iframe) iframe = document.createElement(""iframe""); iframe.frameBorder=0; iframe.width=""0px""; iframe.height=""0px""; iframe.id=""iframe""; iframe.setAttribute(""src"", ""about:blank""); document.body.appendChild(iframe); var image = new Image(); image.src = """ & CanvasSnapshot & """; $(""#iframe"")[0].contentWindow.document.open(); $(""#iframe"")[0].contentWindow.document.appendChild(image); $(""#iframe"")[0].contentWindow.document.close(); window.frames[""iframe""].focus(); window.frames[""iframe""].print();"[/code:1d3shdhx]
You could link them manually, using instance UID, and abandon containers. Although the manageability would suffer a bit, you wouldn't have to worry about that duplicate texture problem.
The SOL (selected objects list) doesn't transpose into function calls. You have to redo all pickings. You can either pass your newly created card UID to the function and add a pick by UID condition, or create the card inside your function, since an implicit picking is done on "create object" calls.
I guess you could that with a function.
Both of these functions work, use the one that suits you most !
You could even add another parameter to set a specific value to those keys, instead of the default 0.
Do you pass your card UID so you can pick the correct card in your function ?
Although not possible using built-in functionalities, you might want to take a look at rexrainbow Nickname plugin. It allows for something similar to what you seek.
eli0s XPath is probably the most daunting part. But once you get the grasp of it, you'll be writing XPath expression like it's a second nature ! Here's the W3Schools tutorial on XPath. It covers everything you need to know for node searching and stuff.
Here's what I found on MSDN.
http://msdn.microsoft.com/en-us/library/windows/apps/hh967786.aspx
That tutorial has pretty much everything you need. But here's my example anyway, it might explains things a bit further.
https://dl.dropboxusercontent.com/u/7004246/dialogsXml.capx
I will concoct an example for both of you guys. Stay tuned !
Member since 4 Jul, 2011