than one operation on a page.
Hope that helps.
--
Tom Jordahl
Macromedia
-Original Message-
From: Kevin Graeme [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 12:40 PM
To: CF-Talk
Subject: Re: Since CF knows no nulls...
> > I don't know if this is specific
Yeah, thanks. That's kinda what I ended up with. Check out my response
to Ray Camden, if you want to see exactly what I was talking about/how
it was resolved.
Thanks,
Jamie
On Tue, 25 Nov 2003 11:41:09 -0600, in cf-talk you wrote:
>you might try
>
>> I was refactoring a CFC last night, and real
you might try
> I was refactoring a CFC last night, and realized that
> since CF doesn't
> have nulls, method calls within methods can be a little
> ugly.
> My invocations (within a method) ended up looking like
> this (hardly
> prettier than my un-factored code):
>
>
> value="definition"
> > I don't know if this is specifically why, but my notes from a
> > MAX session mention that using cfinvoke slows things down because
> > it needs to create and manage a new object for each call, and
> > it was recommended to reuse existing objects where possible.
>
> In the absence of reuse, tho
Ok, my bad. :)
-Original Message-
From: Tom Kitta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 12:15 PM
To: CF-Talk
Subject: Re: Since CF knows no nulls...
I said that its better NOT to use cfinvoke and use cfobject. I.e. I am
on your side, for speed of code execution
Although this statement is still not true, as you can use cfinvoke with
cfobject. Speed is not an issue here. Style is.
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
Sent: Tuesday, November 25, 2003 12:00 PM
To: CF-Talk
Subject: Re: Since CF knows no nulls...
If you are using more than one function from a CFC its better (faster)
to create an object. Also, object way is cleaner (at least for me).
[Todays Threads]
[This Message]
[Subscription]
[F
He says the opposite, if calling more than one function, create the object
so you can reuse it. Again though, as others have said, you can easily use
cfinvoke w/ existing objects, so it really does just come down to style. Use
what makes sense for you.
[Todays Threads]
[This Message]
[Subscr
PM
To: CF-Talk
Subject: Re: Since CF knows no nulls...
If you are using more than one function from a CFC its better (faster)
to create an object. Also, object way is cleaner (at least for me).
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
If you are using more than one function from a CFC its better (faster) to create an object. Also, object way is cleaner (at least for me).
TK
- Original Message -
From: Bryan F. Hogan
To: CF-Talk
Sent: Tuesday, November 25, 2003 11:54 AM
Subject: RE: Since CF knows no nulls
> I don't know if this is specifically why, but my notes from a
> MAX session mention that using cfinvoke slows things down
> because it needs to create and manage a new object for each
> call, and it was recommended to reuse existing objects where
> possible.
You can specify an existing object
> I don't know if this is specifically why, but my notes from a
> MAX session mention that using cfinvoke slows things down because
> it needs to create and manage a new object for each call, and
> it was recommended to reuse existing objects where possible.
In the absence of reuse, though, it
I think I can see that.
Mo=createObject();
Mo.doSomething();
Mo.doSomthing();
Instead of
Which would be akin to doing?
Mo.createObject();
Mo.dosomething();
Mo.createObject();
Mo.doDomething();
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
ssage -
From: "Raymond Camden" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 25, 2003 9:49 AM
Subject: RE: Since CF knows no nulls...
> Why do you say cfinvoke is only used for special cases? cfinvoke can be
used
> any time. It
Thanks for the reply.
Building on your argumentCollection suggestion, I think I've got it
figured out. I could just pass the whole arguments collection via
argumentCollection. Here's an example:
formattedName = ""
// This wraps up what I'm talking about
Why do you say cfinvoke is only used for special cases? cfinvoke can be used
any time. It's really more of a syntax preference as to which one you should
use.
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
Why are you using cfinvoke? That tag is almost used only for special cases, 99% of time I use cfobject and it all boils down to one line:
myMethod(sqlColumns=sqlColumns termKey=termKey ...)
TK
- Original Message -
From: Jamie Jackson
To: CF-Talk
Sent: Tuesday, November 25, 2003
By the way, my solution is a bit over the top if you are using cfinvoke
syntax. You may find this easier:
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
I'm a bit confused, but are you saying you need a way to call a method and
dynamically pass in certain arguments? If so, just use argumentCollection.
s = structNew();
if(today is a special day) {
s.foo = 1;
}
s.goo = 1;
x = methodName(argumentCollection=s);
When you use argumentCollection, ever
myQuery=createObject('component','mycfc');
dump(myQuery.qryHelper(sqlColumns="Yadda, Yadda,
Yadda",termKey="stuff"));
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
20 matches
Mail list logo