Hi All,
I'm working on an OOP project and am having a bit of a problem with objects
referencing each other.
My folder structure is
/siteRoot/
/siteRoot/core (Where all my classes are)
/siteRoot/core/valueObjects
I'm quite early on in the build so I'm just setting up my value classes.
The quick way to fix this issue is to just set the argument type to
any. Coldfusion is dynamic and can handle that just fine. However,
this can make debugging the app more difficult because instead of
getting a helpful type-casting error, you may get something like tthe
method cannot be found,
Tim,
I am not 100% sure, but I have come across this before and I think it
has to do with loading the cfc from the current directory.
Others like Sean might give a better explanation, but my fix has been
to create a mapping for core or to use /core.package.component.
On 10/11/07, Tim
-
From: Matt Williams [mailto:[EMAIL PROTECTED]
Sent: 11 October 2007 15:17
To: CF-Talk
Subject: Re: OOP Coldfusion
The quick way to fix this issue is to just set the argument type to any.
Coldfusion is dynamic and can handle that just fine. However, this can make
debugging the app more difficult
Also, as Matt said, this sort of thing screams ColdSpring:
cfset page = CreateObject(component,core.valueObjects.Page).init()
cfset head =
CreateObject(component,core.valueObjects.Head).init(title:This
is a new title)
cfset page.setHead(head)
Trust me, if you're serious about building OO
You can try clearing the template cache in the CF administrator. Sometimes
the way CF stores CFCs in its cache can screw things up when it comes to
typing if you have moved things around, changed names, or instantiated the
same component from multiple folders. It thinks the type is pointing
Tim
Did you try and set up a mapping to the top level of your components
directory?
Frame works are a good thing, they take a lot of these types of questions
away from you so you can concentrate on what it is you need to concentrate
on, that being the solution to the problem.
Whether its
Just to be clear though, ColdSpring is a dependency injection framework for
your model and has nothing to do with the front controller frameworks like
Mach-II or Fusebox. They do totally different things (ColdSpring works with
any of the front-controller frameworks, or with no framework at all).
is the best framework?
*ducks*
Only joking ;)
-Original Message-
From: gary gilbert [mailto:[EMAIL PROTECTED]
Sent: 11 October 2007 16:15
To: CF-Talk
Subject: Re: OOP Coldfusion
Tim
Did you try and set up a mapping to the top level of your components
directory?
Frame works are a good
On 10/11/07, Matt Williams [EMAIL PROTECTED] wrote:
On 10/11/07, Tim Ashworth [EMAIL PROTECTED] wrote:
Having said that tho - which is the best framework?
ColdMachTransfer-ReactorFuseGlue
But be sure to get the BER from SVN or CVS or Walgreens, or something.
:P
--
Matt Williams
It's the
On 10/11/07, Tim Ashworth [EMAIL PROTECTED] wrote:
Having said that tho - which is the best framework?
ColdMachTransfer-ReactorFuseGlue
--
Matt Williams
It's the question that drives us.
~|
ColdFusion 8 - Build next
11 matches
Mail list logo