Re: calling a cfc function from the same cfc

2010-08-25 Thread Sean Corfield

On Wed, Aug 25, 2010 at 5:00 AM, David McGraw  wrote:
> In instances of calling a function that has no return, I find it easier on 
> the eyes to call them with cfscript.

Well, I write all my CFCs completely in cfscript these days anyway -
so I agree with you! I was just curious why the OP thought it looked
odd.
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336559
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: calling a cfc function from the same cfc

2010-08-25 Thread David McGraw

In instances of calling a function that has no return, I find it easier on the 
eyes to call them with cfscript.


domain1_404(arguments.requested_template);
 

David McGraw
Oyova Software, LLC
http://www.oyova.com

>>
>> 
>>
>> Hmm, that's a weird syntax.
>
>I'm curious... Why do you think that's a weird syntax? After all, it's
>how you'd call built-in functions that don't return anything, such as
>setEncoding() or any number of others...
>-- 
>Sean A Corfield -- (904) 302-SEAN
>Railo Technologies, Inc. -- http://getrailo.com/
>An Architect's View -- http://corfield.org/
>
>"If you're not annoying somebody, you're not really alive."
>-- Margaret Atwood 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336499
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: calling a cfc function from the same cfc

2010-08-24 Thread Sean Corfield

On Mon, Aug 23, 2010 at 2:53 PM, Matthew Smith  wrote:
>
> 
>
> Hmm, that's a weird syntax.

I'm curious... Why do you think that's a weird syntax? After all, it's
how you'd call built-in functions that don't return anything, such as
setEncoding() or any number of others...
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336497
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: calling a cfc function from the same cfc

2010-08-23 Thread Matthew Smith



Hmm, that's a weird syntax.  output needed to be set to yes.  Thank you both
for the help.

On Mon, Aug 23, 2010 at 3:52 PM, Andrew Scott wrote:

>
> Actually I don't think it will make a difference, but you should do this
>
> 
>
> Not this
>
> 
>
> Reason being is that you are not returning anything from this method as it
> is set to void.
>
> Regards,
> Andrew Scott
> http://www.andyscott.id.au/
>
>
> > -Original Message-
> > From: Matthew Smith [mailto:chedders...@gmail.com]
> > Sent: Tuesday, 24 August 2010 6:50 AM
> > To: cf-talk
> > Subject: calling a cfc function from the same cfc
> >
> >
> > I currently have a cfc to handle 404's that is called by my 404.cfm.  It
> is
> > working fine, but I need to use the same cfc for different sites.
> >
> > This works (very simplified, much more going on):
> > 
> > 
> > 
> >   > template="/index.cfm"
> > fuseaction="TheGallery.displayCategory"
> >  key="#variables.category#"
> > requested_template="#arguments.requested_template#"
> >  page_num="#variables.page_num#"
> > ignoresupresslayout="1">
> >  
> > 
> > 
> >
> >
> > But this does not:
> >
> > 
> > 
> > 
> > 
> >> variables.tmp = domain1_404(arguments.requested_template)>
> > 
> >  
> >   > output="no">
> >  
> >   > template="/index.cfm"
> > fuseaction="TheGallery.displayCategory"
> >  key="#variables.category#"
> > requested_template="#arguments.requested_template#"
> >  page_num="#variables.page_num#"
> > ignoresupresslayout="1">
> >  
> > 
> > 
> >
> > I don't know if I am just calling the second function improperly?  What
> would
> > be the best way to accomplish what I am doing?
> >
> > --
> > Regards,
> > Matthew Smith
> >
> >
> > ~~
> > ~~~|
> > Order the Adobe Coldfusion Anthology now!
> > http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-
> > Dinowitz/dp/1430272155/?tag=houseoffusion
> > Archive: http://www.houseoffusion.com/groups/cf-
> > talk/message.cfm/messageid:336484
> > Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
> > Unsubscribe: http://www.houseoffusion.com/groups/cf-
> > talk/unsubscribe.cfm
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336487
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: calling a cfc function from the same cfc

2010-08-23 Thread Andrew Scott

Actually I don't think it will make a difference, but you should do this



Not this



Reason being is that you are not returning anything from this method as it
is set to void.

Regards,
Andrew Scott
http://www.andyscott.id.au/


> -Original Message-
> From: Matthew Smith [mailto:chedders...@gmail.com]
> Sent: Tuesday, 24 August 2010 6:50 AM
> To: cf-talk
> Subject: calling a cfc function from the same cfc
> 
> 
> I currently have a cfc to handle 404's that is called by my 404.cfm.  It
is
> working fine, but I need to use the same cfc for different sites.
> 
> This works (very simplified, much more going on):
> 
> 
> 
>   template="/index.cfm"
> fuseaction="TheGallery.displayCategory"
>  key="#variables.category#"
> requested_template="#arguments.requested_template#"
>  page_num="#variables.page_num#"
> ignoresupresslayout="1">
>  
> 
> 
> 
> 
> But this does not:
> 
> 
> 
> 
> 
>variables.tmp = domain1_404(arguments.requested_template)>
> 
>  
>   output="no">
>  
>   template="/index.cfm"
> fuseaction="TheGallery.displayCategory"
>  key="#variables.category#"
> requested_template="#arguments.requested_template#"
>  page_num="#variables.page_num#"
> ignoresupresslayout="1">
>  
> 
> 
> 
> I don't know if I am just calling the second function improperly?  What
would
> be the best way to accomplish what I am doing?
> 
> --
> Regards,
> Matthew Smith
> 
> 
> ~~
> ~~~|
> Order the Adobe Coldfusion Anthology now!
> http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-
> Dinowitz/dp/1430272155/?tag=houseoffusion
> Archive: http://www.houseoffusion.com/groups/cf-
> talk/message.cfm/messageid:336484
> Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
> Unsubscribe: http://www.houseoffusion.com/groups/cf-
> talk/unsubscribe.cfm


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336486
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: calling a cfc function from the same cfc

2010-08-23 Thread Andrew Scott

You are calling it correctly, but what is the error message that you are
getting?

Regards,
Andrew Scott
http://www.andyscott.id.au/


> -Original Message-
> From: Matthew Smith [mailto:chedders...@gmail.com]
> Sent: Tuesday, 24 August 2010 6:50 AM
> To: cf-talk
> Subject: calling a cfc function from the same cfc
> 
> 
> I currently have a cfc to handle 404's that is called by my 404.cfm.  It
is
> working fine, but I need to use the same cfc for different sites.
> 
> This works (very simplified, much more going on):
> 
> 
> 
>   template="/index.cfm"
> fuseaction="TheGallery.displayCategory"
>  key="#variables.category#"
> requested_template="#arguments.requested_template#"
>  page_num="#variables.page_num#"
> ignoresupresslayout="1">
>  
> 
> 
> 
> 
> But this does not:
> 
> 
> 
> 
> 
>variables.tmp = domain1_404(arguments.requested_template)>
> 
>  
>   output="no">
>  
>   template="/index.cfm"
> fuseaction="TheGallery.displayCategory"
>  key="#variables.category#"
> requested_template="#arguments.requested_template#"
>  page_num="#variables.page_num#"
> ignoresupresslayout="1">
>  
> 
> 
> 
> I don't know if I am just calling the second function improperly?  What
would
> be the best way to accomplish what I am doing?
> 
> --
> Regards,
> Matthew Smith
> 
> 
> ~~
> ~~~|
> Order the Adobe Coldfusion Anthology now!
> http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-
> Dinowitz/dp/1430272155/?tag=houseoffusion
> Archive: http://www.houseoffusion.com/groups/cf-
> talk/message.cfm/messageid:336484
> Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
> Unsubscribe: http://www.houseoffusion.com/groups/cf-
> talk/unsubscribe.cfm


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336485
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


calling a cfc function from the same cfc

2010-08-23 Thread Matthew Smith

I currently have a cfc to handle 404's that is called by my 404.cfm.  It is
working fine, but I need to use the same cfc for different sites.

This works (very simplified, much more going on):



 

 




But this does not:



 

 
 

 
 
 
 

 



I don't know if I am just calling the second function improperly?  What
would be the best way to accomplish what I am doing?

-- 
Regards,
Matthew Smith


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336484
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm