Yep read those first Ben!
-Original Message-
From: Ben Forta [mailto:b...@forta.com]
Sent: Monday, March 22, 2010 3:49 PM
To: cf-talk
Subject: RE: CFC Newbie
These are old, but may answer the question:
http://www.adobe.com/devnet/coldfusion/articles/intro_cfcs.html
http
: cf-talk
Subject: Re: CFC Newbie
> ask and you shall be enlightened:
>
>
http://www.bennadel.com/blog/726-ColdFusion-Application-cfc-Tutorial-And-App
lication-cfc-Reference.htm
While that's useful information to be sure, it doesn't address the
original poster's question, w
> ask and you shall be enlightened:
>
> http://www.bennadel.com/blog/726-ColdFusion-Application-cfc-Tutorial-And-Application-cfc-Reference.htm
While that's useful information to be sure, it doesn't address the
original poster's question, which is about CFC use in general.
Application.cfc is quite
ask and you shall be enlightened:
http://www.bennadel.com/blog/726-ColdFusion-Application-cfc-Tutorial-And-Application-cfc-Reference.htm
~|
Want to reach the ColdFusion community with something they want? Let them know
on the
> I'm trying to get out of MX non CFC world. I've now working with CF8 and
> want to start converting some of my things to use CFC's. Specifically how I
> can use forms to interact with CFC's to add/edit/delete data. I've read a
> few tutorials from adobe about them and what I've seen on a few blo
On 2/17/06, Aaron Roberson <[EMAIL PROTECTED]> wrote:
>
> In my Java book it says that if a method is public, a data filed could
> be assigned a value directly, BUT doing so "violates an important
> principle of object-oriented programming -- that of data hiding using
> encapsulation.
>
> However,
Thanks Rick, I will surely take a look.
-Aaron
On 2/16/06, Rick Root <[EMAIL PROTECTED]> wrote:
> Aaron Roberson wrote:
> >
> > I am going to keep all of these threads, print them out, and go over
> > them multiple times until I begin to grasp it all. I guess I won't be
> > learning CFAJAX until
Aaron Roberson wrote:
>
> I am going to keep all of these threads, print them out, and go over
> them multiple times until I begin to grasp it all. I guess I won't be
> learning CFAJAX until I get CFC's down, which is proving to be quite a
> task and very lengthy process.
CFCs are wonderful!
If
James,
I am going to keep all of these threads, print them out, and go over
them multiple times until I begin to grasp it all. I guess I won't be
learning CFAJAX until I get CFC's down, which is proving to be quite a
task and very lengthy process.
Thanks again and again!
-Aaron
"To instantiate
No, for the moment, forget THIS.
>
>
should be
The life cycle of the instance depends on where you put it.
Instantiate it in the session scope, it lasts as long as the session.
Similar for the application scope.
The use of THIS is to make this bit work:
Inside that, the init() method re
> The only use for THIS in an OO-based component is to return THIS at
> the end of the constructor. That returns the entire component for use
> as an instance.
In Java, the constructer is for providing arguments with default
values. These default values can be the ones that are automaticly
assigne
The only use for THIS in an OO-based component is to return THIS at
the end of the constructor. That returns the entire component for use
as an instance.
The properties will be in the VARIABLES scope; they can be used via
getter and setter methods. This is where the ARGUMENTS scope comes in
- the
What about the constructor function? Shouldn't I set the properties in
the THIS scope when initializing a component?
Also, what is the difference between the variables scope and the
arguments scope withing a method? I have seen properties defined using
the cfargument tag referenced in the method u
Yes, encapsulation is an important part of OO and yes many people don't care.
If you want to maintain the encapsulation, don't set thigns in the
THIS scope - use a setter method to set them in the VARIABLES scope
(and a getter method to get them out again):
newUser = createobject("component", "
it looks like it is specifically coded to run from the calendar
folder. Try creating a calendar folder and dropping all the files in
that and running it again.
I dropped the folder that unzipped from the download, into my webroot.
called /calendar/sample/index.cfm and the whole app came to life.
>
> Two follow up questions. You can't directly use the var key
> word in the tag; .
Correct. You also can't do after any line of real code.
So, your first N lines of a method will be cfargument tags, then cfset
var tags, then 'real' code.
So, that's why you saw me do:
> Also, when
onent?
--
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 12:38 PM
To: CF-Talk
Subject: RE: CFC Newbie Discussion.
>
> So this example was meant to show how to protec
>
> So this example was meant to show how to protect variables
> inside the method? If I follow correctly, you created a
> variable scoped to the 'var' scope (named "myQuery"), then
> set the variable equal to the value of the Query? Does this
> mean that, if I follow what you say below...
>
on 6/10/03 2:55 PM, Raymond Camden at [EMAIL PROTECTED] wrote:
> By the way, there is one more scope you should be convered with - and
> that is 'var' scoped method variables. Whenever you use a value in a
> method, a value that is NOT meant to exist in the CFC whole, you should
> use the var scop
PROTECTED]
Sent: Tuesday, June 10, 2003 11:57 AM
To: CF-Talk
Subject: Re: CFC Newbie Discussion.
You are asking all the right quesitons to learn... keep asking. :-)
to keep variables protected within functions, use:
to keep variables protected to the cfc and functions within the cfc, use:
your own s
t; <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003 2:49 PM
Subject: RE: CFC Newbie Discussion.
> Ahh, I understand now, the best practice we are talking about is
protecting
> the state/variables of ones objects, but using private variab
s/blog
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -Original Message-
> From: Ian Skinner [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 12:49 PM
> To: CF-Talk
> Subject: RE: CFC Newbie Discussion.
>
>
>
urce
Sacramento, CA
-Original Message-
From: Christian Cantrell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:40 AM
To: CF-Talk
Subject: Re: CFC Newbie Discussion.
On Tuesday, June 10, 2003, at 02:20 PM, Raymond Camden wrote:
> While I strongly urge folks to not use the Thi
ly is the Force, and a powerful ally it is." - Yoda
> -Original Message-
> From: Christian Cantrell [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 12:40 PM
> To: CF-Talk
> Subject: Re: CFC Newbie Discussion.
>
>
> On Tuesday, June 10, 2003, at 02
On Tuesday, June 10, 2003, at 02:20 PM, Raymond Camden wrote:
> While I strongly urge folks to not use the This scope, I would _not_
> call it a bug. The This scope works _exactly_ as advertised, it's just
> not the preferred way of storing data for a CFC.
Raymond is correct. It is not a bug --
quot;CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003 2:30 PM
Subject: RE: CFC Newbie Discussion.
> So what is the Preferred way to store data for a CFC?
>
> --
> Ian Skinner
> Web Programmer
> BloodSource
> Sacramento, CA
>
>
> -Origina
Here is a summary from a few previous emails:
1. Define properties(variables) as instance.X to prevent any outside view
or editing of them.
2. Use "getX" methods to allow outside viewing, and "setX" methods to set
the variable.
3. Define non-property variables used with each method through (c
The this scope has always worked exactly as I expected, and I do
prefer to use it to store data unless there is a specific reason not to.
--
jon
mailto:[EMAIL PROTECTED]
Tuesday, June 10, 2003, 2:20:22 PM, you wrote:
RC> While I strongly urge folks to not use the This scope, I would _not_
RC>
So what is the Preferred way to store data for a CFC?
--
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:20 AM
To: CF-Talk
Subject: RE: CFC Newbie Discussion.
While I
While I strongly urge folks to not use the This scope, I would _not_
call it a bug. The This scope works _exactly_ as advertised, it's just
not the preferred way of storing data for a CFC.
-Raymond Camen
>
> Let me point out the scope bug...
>
> using "this" scope exposes your data members outs
e
Sacramento, CA
-Original Message-
From: jon hall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:01 AM
To: CF-Talk
Subject: Re: CFC Newbie Discussion.
This part confuses me...this scoped variables refer to the object they
are contained within. It looks like you are setting th
probably for a person new to CFCs, keeping them
focused on CFCs and not the relations to OO would be a good start.
Mike
- Original Message -
From: "John Quarto-vonTivadar" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003
This part confuses me...this scoped variables refer to the object they
are contained within. It looks like you are setting them outside of a
cfc. All that will do is create a structure called this, which
contains x and y keys, its odd it works in the first place. I would
think this should be
>
> Thinking about CFCs like classes in Java or C++ is natural for me, so I
like
> to work in that mentality..
it might be more efficient to think of CFCs like CFCs, that way you can use
their features effectively, and not be disappointed or disillusioned if CFCs
do things you dont expect or dont
Skinner
Web Programmer
BloodSource
Sacramento, CA
-Original Message-
From: Michael Tangorre [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 10:32 AM
To: CF-Talk
Subject: Re: CFC Newbie Discussion.
Let me point out the scope bug...
using "this" scope exposes your data members out
not unknown... obviosuly its known :-) known as nothing!
That should read the unnamed scope.
Sorry If I confused matters...
- Original Message -
From: "Michael Tangorre" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003
In terms of which is the most efficient way of calling a cfcs... I like to
use
CreateObject(objectname,component);
Thinking about CFCs like classes in Java or C++ is natural for me, so I like
to work in that mentality.. like Hal Helms points out.
Keep in mind though, some hosting providers limit
Let me point out the scope bug...
using "this" scope exposes your data members outside of the cfc. In
addition, the varibales scope is not the default for not providing a scope
within a CFC. There is something known as the "unknown" scope. This unknown
scope allows data members to be available to
> the file:
>
> -Original Message-
> From: Michael Corbridge [mailto:mcorbridge@;macromedia.com]
> Sent: Friday, October 18, 2002 10:21 AM
> To: CF-Talk
> Subject: RE: CFC newbie
> create a CF mapping for 'com'
> -Original Message-
> From: Tho
> create a CF mapping for 'com'
Ahh, great ! That was it.
Friday brain fade - the sub dir I was in was mapped, so the 'com' directory
I created was in the wrong place. Moving it to the actual wwwroot worked a
treat.
Tom Chiverton
You don't have to be a mad scientist to believe in ColdFusion
Actually, the last object label in the dotted notation should be the name of
the file:
-Original Message-
From: Michael Corbridge [mailto:mcorbridge@;macromedia.com]
Sent: Friday, October 18, 2002 10:21 AM
To: CF-Talk
Subject: RE: CFC newbie
create a CF mapping for
create a CF mapping for 'com'
-Original Message-
From: Thomas Chiverton [mailto:thomas.chiverton@;locavista.com]
Sent: Friday, October 18, 2002 11:05 AM
To: CF-Talk
Subject: RE: CFC newbie
>
That should read "com.local.gui" sorry, mis-typed into O
>
That should read "com.local.gui" sorry, mis-typed into Outlook, so still
broken...
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=
oo IM : cfjedimaster
"My ally is the Force, and a powerful ally it is." - Yoda
> -Original Message-
> From: Michael Corbridge [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 8:18 AM
> To: CF-Talk
> Subject: RE: CFC newbie question
>
>
>
h...
all the example code was removed from my previous email.
I'll try again.
cftalk1.cfm
---
cftalk1.cfc
SELECT
*
FROM
tblEmp
Ali,
Here is a stripped down version of your cfc that works with the native 'exampleapps'
datasource that is shipped with CFMX.
Notes:
You have set the method access='private' which means that method can only be called
from another method in the component. When starting out with cfc's, I wo
You forgot you # signs...
> to="queryemail.tblemails_to"
> from="queryemail.tblemails_from"
should be
> to="#queryemail.tblemails_to#"
> from="#queryemail.tblemails_from#"
Not a CFC issue - just a syntax issue.
47 matches
Mail list logo