The trace functions arguments are implemented as follows trace(...
arguments). Which means that all types of variables are accepted. Every type
of variable extends Object and with that every instance will have a toString
method. This is the method the trace function will call to display the
value.

The actual text from the documentation:

Displays expressions, or writes to log files, while debugging. A single
trace statement can support multiple arguments. If any argument in a trace
statement includes a data type other than a String, the trace function
invokes the associated toString() method for that data type. For example, if
the argument is a Boolean value the trace function invokes Boolean.toString()
and displays the return value.


Greetz Erik


On 9/10/07, ben gomez farrell <[EMAIL PROTECTED]> wrote:
>
> I don't think you're doing anything wrong, its just that the trace
> function only accepts strings as parameters.  So when you pass in your
> XML variable it would throw an error if you were using a more strict
> language like Actionscript 3 (at least I assume it throws an error in
> AS3, maybe it actually does the same thing).
> However, if you're using AS2, which is less strict, the trace function
> expects a string, so it'll try to convert your XML to a string, and it
> looks like its successful. It probably runs the XML.toString() method
> when it gets to the trace method.
> So you're not going to get anything from trace except for a converted
> string.  And it'll do the same thing in your scriptPath string, because
> its going to convert that XML variable to a string.
> If you want more control, you might try looping through your XML to
> create a more custom string, and then use that.
> ben
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to