Quote:
Originally Posted by ApothiX
Ah, I see what it's doing now, but I still stand by my saying I don't think you should be setting this, especially if you're just setting it as a string.
|
Because the way I have it is the only way I could figure out the recursion to work correctly. If I set the string inside of the function, any child that has children will be changed to that child's children. If you get what I'm saying.
PHP Code:
<key />
<node id="1">
<childnode />
</node>
'me' would still be '<key />\n<node id="1">\n <childnode />\n</node>', but 'me.childNodes' would come up with <key /> and ' ,<childnode />'.
Yes, it is possible to change that, but it would be reparsing bits that have already been parsed.
And setting this is not harming anything. I am merely setting a variable a different way.
PHP Code:
new TGraalVar("me") {
this = "This is perfectly acceptable.";
}
If I was setting the NPC's this, then it might be a problem.
Quote:
Originally Posted by ApothiX
Why not just make it set a 'me.parsedXML', and return an error code?
PHP Code:
with(me) {
temp.errorcode = parseXML();
}
switch(temp.errorcode) {
// Error Checking
}
|
Well, if I really wanted to follow ActionScript, I would set XML.status, which gives an error code.
e:
temp.before = strXML.substring(temp.test);
should be
temp.before = strXML.substring(0,temp.test);
in the code.