Look up the Function class in your favorite API reference, and check out its "apply" method... it'll let you call a function with an array of arguments.
Troy. On 4/26/07, Doug Lowder <[EMAIL PROTECTED]> wrote:
Sounds like you may be able to use ...rest for that. http://livedocs.adobe.com/flex/201/langref/statements.html#..._(rest) _parameter --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "hank williams" <[EMAIL PROTECTED]> wrote: > > I want to call a function, call it "foo" in a circumstance where, at compile > time, I dont know what the parameters to foo are going to be. In the past > perhaps I could have used something like Eval to construct the call, but > that is no longer available. > > As an example, in one circumstance I might want to call: > > foo("a"); > > and in another circumstance I would want to call > > foo("a","b") > > but in each case the exact number of parameters is indeterminate and must be > constructed on the fly. Unfortunately, I cannot pass an array into foo, I > must actually have an independent parameter for each passed value. > > Any ideas? > > Thanks, > Hank >