> 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
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
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
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
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.
>
>
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
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
>>
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. ;)
>
> ---
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
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
> 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
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
> 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
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
14 matches
Mail list logo