I should have explained that I cant use apply because it is a proxyed function so it doesnt really exist. I am trying to do this with remoteObject so the actual function I am calling is not real but is handled by an overridden "callProperty" function.
Hank On 4/26/07, Troy Gilbert <[EMAIL PROTECTED]> wrote:
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 [email protected] <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 > > > >

