Re: passing an unknown # of arguments to a function?
Charles Goodwin <[email protected]>
| Newsgroups | gmane.comp.java.xwt.general |
|---|---|
| Message-ID | <308906BE5D07D5119285009027D61C5722F662@NTFPS1> |
Did you try accessing arguments[0], arguments[1], etc... It may not work like an array. -----Original Message----- From: Andrew Kohlsmith [mailto:[email protected]] Sent: 31 March 2003 16:31 To: [email protected] Subject: [xwt-dev] passing an unknown # of arguments to a function? I thought I could get away with using the arguments array, but apparently not. :-( func1 = function() { xwt.recursivePrintObject(arguments); func2(arguments); } func2 = function() { xwt.recursivePrintObject(arguments); } I call func1 as func1("abc", 1234, "1234"); On the output, all I see is mytemplate: <object> mytemplate: <object> I tried declaring them as function(arguments) but got the same type of output. If I put a println to see the arguments.length, that is correct (3) in func1() but wrong (1) in func2. Is this possible? How? Regards, Andrew _______________________________________________ http://lists.xwt.org/listinfo/dev _______________________________________________ http://lists.xwt.org/listinfo/dev