There is also doco and a good google group as well, so you don't have to
speed dial me ;o)
Yep, I'm subscribed there as well :)
Obviously, I don't really mind if you don't want to use
Transfer (or any other persistence framework) ;o), it may
well not fit your needs, but I just think the
On 10/24/07, Jonathon Stierman [EMAIL PROTECTED] wrote:
Querying it is what I meant -- sorry for the confusion! What I'd love is
a
Get me a list/query/enum of all the Book records written by this Author
method from within an Author object. As you noted, I could do it with
TQL,
or I
cfdump'ed a
TransferObject when I was testing, so I must have either set it up wrong in
the configuration or missed the method.
Jonathon
-Original Message-
From: Brian Kotek [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 24, 2007 12:02 PM
To: CF-Talk
Subject: Re: programmatically add
environment, but there is a little stigma about using beta
apps on live servers with the higher-ups.
Jonathon
-Original Message-
From: Mark Mandel [mailto:[EMAIL PROTECTED]
Sent: Monday, October 22, 2007 6:15 PM
To: CF-Talk
Subject: Re: programmatically add functions to a CFC
Jonathan
I am actually not using Autowiring -- I'm manually setting up the ColdSpring
file with the dependencies, but the config is being generated dynamically
for me beforehand by another application.
I'm not actually parsing an existing CFC for the dependencies, unless I'm
mis-understanding what you
Yes! One of my favorite tools :)
Jonathon
-Original Message-
From: henry ho [mailto:[EMAIL PROTECTED]
Sent: Monday, October 22, 2007 6:12 PM
To: CF-Talk
Subject: Re: programmatically add functions to a CFC
btw, since you're into code generation, have you checked this out?
Illudium PU
On 10/23/07, Jonathon Stierman [EMAIL PROTECTED] wrote:
I am actually not using Autowiring -- I'm manually setting up the
ColdSpring
file with the dependencies, but the config is being generated dynamically
for me beforehand by another application.
cfcomponent extends=Components.Core.DAO
First, you can use constructor injection instead of setter injection
In some cases, yes. In other cases, I have circular dependencies, which
cannot use constructor injection. I typically always use setter injection
for this reason -- I find it's more flexible.
Second, you seem to be calling
On 10/24/07, Jonathon Stierman [EMAIL PROTECTED] wrote:
My plan is to have a generic modify page that I can pass in the DAO, and
then the page would automatically create the correct form fields. I could
probably use Transfer to make this work (there does seem to be a bit of
meta-data stored
On 10/23/07, Jonathon Stierman [EMAIL PROTECTED] wrote:
First, you can use constructor injection instead of setter injection
In some cases, yes. In other cases, I have circular dependencies, which
cannot use constructor injection. I typically always use setter injection
for this reason --
Is it possible to programmatically add/update functions to an instantiated
CFC?
I've made one attempt to add one by calling the getMetaData function, but
nothing I added to the meta data seemed to update the object's method list.
Is there another way to go about doing this, or am I on the right
The meta data is just an interpretation of the component and not an
interface to it. I'm not sure how you would achieve what you want, but that
is definately not the right direction.
Good luck,
Dominic
On 22/10/2007, Jonathon Stierman [EMAIL PROTECTED] wrote:
Is it possible to
Jonathon Stierman wrote:
Is it possible to programmatically add/update functions to an instantiated
CFC?
cffunction name=getX
cfreturn variables.X
/cffunction
cfcomponent name=superSecret
cfset variables.key = x
/cfcomponent
cfset obj = CreateObject(component, superSecret)
Jonathon,
You're on the right track, but it's much easier than that. Here's some play
code I just whipped up:
cfscript
function getVariablesExternal() {return variables;}
function methodToInject() {return This method was Injected;}
myCFC = createObject(component,test).init(); // get
Look at some AOP framework for CF, and you'll find out.
Coldspring - http://www.coldspringframework.org/ : From what I saw in the code,
they use CFFILE to generate the cfm and CFINCLUDE it. They called it dynamic
compilation -
Nice
On 22/10/2007, henry ho [EMAIL PROTECTED] wrote:
Look at some AOP framework for CF, and you'll find out.
Coldspring - http://www.coldspringframework.org/ : From what I saw in the
code, they use CFFILE to generate the cfm and CFINCLUDE it. They called it
dynamic compilation -
Note that LightWire does not implement AOP so Peter's comparison is
not entirely a fair one (and this is a common issue that crops up in
comparisons between ColdSpring and LightWire - ColdSpring does a *lot*
more than LightWire so it's pretty pointless trying to directly
compare performance).
PROTECTED]
Sent: Monday, October 22, 2007 1:16 PM
To: CF-Talk
Subject: Re: programmatically add functions to a CFC
Jonathon,
You're on the right track, but it's much easier than that. Here's some play
code I just whipped up:
cfscript
function getVariablesExternal() {return variables
[mailto:[EMAIL PROTECTED]
Sent: Monday, October 22, 2007 2:29 PM
To: CF-Talk
Subject: Re: programmatically add functions to a CFC
Look at some AOP framework for CF, and you'll find out.
Coldspring - http://www.coldspringframework.org/ : From what I saw in the
code, they use CFFILE to generate the cfm
there. Interesting...
Am I still on track, or wildly flailing in the wind? :)
Jonathon
-Original Message-
From: Nathan Strutz [mailto:[EMAIL PROTECTED]
Sent: Monday, October 22, 2007 1:16 PM
To: CF-Talk
Subject: Re: programmatically add functions to a CFC
Jonathon,
You're on the right track
Subject: Re: programmatically add functions to a CFC
Jonathon,
PHP guy eh? In CF there's no way to have a function in a function. Same with
Java. Generally speaking, make another object. Or there's always passing
functions as arguments. See, what it sounds like is you're coming at the
problem
Well hey, your project fits the bill afaik for needing a mix-in of some
sort. I guess Transfer and Reactor didn't fit the bill? It sounds like those
are similar projects. Anyways, yes, a cfinclude will do it for ya.
--
nathan strutz
http://www.dopefly.com/
On 10/22/07, Jonathon Stierman [EMAIL
Subject: Re: programmatically add functions to a CFC
Well hey, your project fits the bill afaik for needing a mix-in of some
sort. I guess Transfer and Reactor didn't fit the bill? It sounds like those
are similar projects. Anyways, yes, a cfinclude will do it for ya.
--
nathan strutz
http
ColdSpring looks for the set**() method for any dependencies, so I need to
make sure that function exists in my CFC!
So you want to write something that will parse your existing CFCs to make sure
Coldspring's Auto-wiring work?
btw, since you're into code generation, have you checked this out?
Illudium PU-36 Code Generator
http://cfcgenerator.riaforge.org/
Highly customizable, and you can make your own template. Use of ORM is
optional.
~|
Check
: programmatically add functions to a CFC
Well hey, your project fits the bill afaik for needing a mix-in of some
sort. I guess Transfer and Reactor didn't fit the bill? It sounds like those
are similar projects. Anyways, yes, a cfinclude will do it for ya.
--
nathan strutz
http://www.dopefly.com
On 10/22/07, Nathan Strutz [EMAIL PROTECTED] wrote:
How about
some functional programming?
Closures! :)
http://cfclosures.riaforge.org/
This lets you create functions on the fly - and of course it does it
under the hood by writing to a file and including it...
--
Sean A Corfield -- (904)
27 matches
Mail list logo