Re: Passing functions as arguments?

2005-11-02 Thread Kenton Gray
Well I pass objects all the time, but in the case of a result function typically i'd want to call a method in the components specifically. Here is a simplified example of what I'm trying to do The cfdump will show that test is a function, however it does not keep the values that are p

Re: Passing functions as arguments?

2005-11-02 Thread Raymond Camden
Another example is QuickSort at CFLIB: http://www.cflib.org/udf.cfm?ID=518 On 11/2/05, Ben Forta <[EMAIL PROTECTED]> wrote: > Actually, you can indeed pass the name of a function to another function, > perhaps as a callback (a bit like using pointers to functions in C). > > I used this technique

Re: Passing functions as arguments?

2005-11-02 Thread Ryan Guill
Agreed. It can be done, but the better way is to pass the whole object. On 11/2/05, Nathan Strutz <[EMAIL PROTECTED]> wrote: > Kenton, > > I'm guessing, but that sounds likea php thing to me. In CF, and in > most traditional languages, you'll find, the ideal way to do it is to > pass object refer

RE: Passing functions as arguments?

2005-11-02 Thread Ben Forta
. --- Ben -Original Message- From: Nathan Strutz [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 1:25 PM To: CF-Talk Subject: Re: Passing functions as arguments? Kenton, I'm guessing, but that sounds likea php thing to me. In CF, and in most traditional languages, y

Re: Passing functions as arguments?

2005-11-02 Thread Nathan Strutz
Kenton, I'm guessing, but that sounds likea php thing to me. In CF, and in most traditional languages, you'll find, the ideal way to do it is to pass object references instead of functions. Put your cffunctions inside of CFCs and send the cfc to a method of a cfc. As for being able to pass a func