RE: Uniquely identifying a function

2003-08-22 Thread Tim Blair
> Certainly many object's hash code in Java are based on their memory > address, which means that it can change over time. However, > java.lang.String's is computed as... [snip] Ah yes, I actually did know that (honest!) but it had escaped me... :) > Ooh, nice, I like that. :) So combining b

RE: Uniquely identifying a function

2003-08-22 Thread Tim Blair
essage- > From: Raymond Camden [mailto:[EMAIL PROTECTED] > Sent: 20 August 2003 03:55 > To: CF-Talk > Subject: RE: Uniquely identifying a function > > > Answer my own question. It returns an instance of itself. So > you could do, > > x = foobar(); &g

Re: Uniquely identifying a function

2003-08-20 Thread Oliver Tupman
Hi all, Just thought I'd throw in a couple of thoughts into the discussion - Firstly you don't need to do 'myFuncRef.toString()' to get the java class name, just get myFuncRef, for example: Don't know if anyone's done it already, but an interesting benefit of this is that you can use them as

RE: Uniquely identifying a function

2003-08-19 Thread Raymond Camden
n [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 19, 2003 8:07 PM > To: CF-Talk > Subject: RE: Uniquely identifying a function > > > Interesting tip - even more so - interesting function. Your > UDF returns

RE: Uniquely identifying a function

2003-08-19 Thread Raymond Camden
nt: Tuesday, August 19, 2003 7:54 PM > To: CF-Talk > Subject: Re: Uniquely identifying a function > > > BTW, you can get the name of the CFM that the function is > defined in by > calling the getPagePath() method of the function. See the following > example. > >

Re: Uniquely identifying a function

2003-08-19 Thread Matt Liotta
On Tuesday, August 19, 2003, at 06:49 PM, Tim Blair wrote: > That's not going to identify a function uniquely - the hashCode() > method will return the hashcode for the theName variable, not for the > function. If I called the method again with exactly the same value, > it'd return a different

Re: Uniquely identifying a function

2003-08-19 Thread Matt Liotta
BTW, you can get the name of the CFM that the function is defined in by calling the getPagePath() method of the function. See the following example. -Matt On Tuesday, August 19, 2003, at 06:49 PM, Tim Blair wrote: >> Obviously, your function names must be unique per CFM, so the >>

Re: Uniquely identifying a function

2003-08-19 Thread Bryan F. Hogan
Matt, sorry. - Original Message - From: "Tim Blair" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, August 19, 2003 6:51 PM Subject: Uniquely identifying a function > >Ok I understand. I like Mike's idea. > > Who's Mike? > > Or did you mean Matt? > > Tom. ;) > > ---

RE: Uniquely identifying a function

2003-08-19 Thread Bryan F. Hogan
Ok I understand. I like Mike's idea. -Original Message- From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:52 PM To: CF-Talk Subject: RE: Uniquely identifying a function > Yes that is what I meant, why not use the name of the > function as the key

Re: Uniquely identifying a function

2003-08-19 Thread Matt Liotta
Obviously, your function names must be unique per CFM, so the unique name for all functions is a concatenation of the CFM name and the function name. Here is a quick UDF (read not tested) that does what you need. function unique(fileName, functionName) { var theName = f

RE: Uniquely identifying a function

2003-08-19 Thread Tim Blair
> Yes that is what I meant, why not use the name of the > function as the key instead of hashing it? Ah right. Can't do that because there may well be multiple functions with the same name (defined in templates that don't run at the same time obviously), hence I need some value for a key which u

RE: Uniquely identifying a function

2003-08-19 Thread Bryan F. Hogan
Yes that is what I meant, why not use the name of the function as the key instead of hashing it? -Original Message- From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:13 PM To: CF-Talk Subject: RE: Uniquely identifying a function > Why not just use the funct

RE: Uniquely identifying a function

2003-08-19 Thread Tim Blair
> Why not just use the function name like: > myFunctionName.FunctionData I'm not using the hashed name to reference the function itself, I'm using it to access the result of the data generated _by_ the function which I've stored in a structure, e.g.: Struct key| Struct dat

RE: Uniquely identifying a function

2003-08-19 Thread Bryan F. Hogan
Why not just use the function name like: myFunctionName.FunctionData instead of i8CF622BA70E703A796DB0FD8AC8ABFA8.FunctionData ? -Original Message- From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 1:49 PM To: CF-Talk Subject: Uniquely identifying a function Ev