RE: this scope

2005-03-30 Thread James Holmes
ore nearly useless Blog, in case anyone wants to argue the point there: http://jr-holmes.coldfusionjournal.com/ -Original Message- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: Thursday, 31 March 2005 2:19 To: CF-Talk Subject: Re: this scope On Thu, 31 Mar 2005 10:15:29 +0800, Ja

Re: this scope

2005-03-30 Thread Sean Corfield
On Thu, 31 Mar 2005 10:15:29 +0800, James Holmes <[EMAIL PROTECTED]> wrote: > Actually, I tried this and the VARIABLES scope worked just as well in > Application.cfc. Really? Oooo, that's good to know... -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? --

RE: this scope

2005-03-30 Thread James Holmes
Actually, I tried this and the VARIABLES scope worked just as well in Application.cfc. Try it yourself - please correct me if I'm wrong. -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: Thursday, 31 March 2005 5:53 To: CF-Talk Subject: Re: this scope &

Re: this scope

2005-03-30 Thread S . Isaac Dealey
> I've been avoiding the "this" scope in my CFCs after > reading several blogs and posts on the topic. Is that > still the best practice in CFMX 7? I ask because all > the examples I see of application.cfc set and > refer to this.name, this.applicationTimeout, etc. I haven't been able to work w

Re: this scope

2005-03-30 Thread Jared Rypka-Hauer - CMG, LLC
ED]> wrote: > Thanks for the clarification, guys. (And I'll never spell applicAtion.cfc > with a lowercase A again.) :) > > -Original Message- > From: Sean Corfield [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 30, 2005 1:51 PM > To: CF-Talk > Subject:

RE: this scope

2005-03-30 Thread Paul
Thanks for the clarification, guys. (And I'll never spell applicAtion.cfc with a lowercase A again.) :) -Original Message- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 1:51 PM To: CF-Talk Subject: Re: this scope On Wed, 30 Mar 2005 13:28:43 -0700,

Re: this scope

2005-03-30 Thread Sean Corfield
On Wed, 30 Mar 2005 13:28:43 -0700, Paul <[EMAIL PROTECTED]> wrote: > I've been avoiding the "this" scope in my CFCs after reading several blogs > and posts on the topic. Is that still the best practice in CFMX 7? I ask > because all the examples I see of application.cfc set and refer to > this.

RE: this scope

2005-03-30 Thread Dave Watts
> I've been avoiding the "this" scope in my CFCs after reading > several blogs and posts on the topic. Is that still the best > practice in CFMX 7? I ask because all the examples I see of > application.cfc set and refer to this.name, > this.applicationTimeout, etc. Yes, avoidance of unnecessar

Re: this scope

2005-03-30 Thread Adrocknaphobia
Most of what I have been reading contradicts best practices when it comes to application.cfc. For instance, how many times on this have you been told not to access external scopes within a CFC. It seems like application.cfc should be the only exception to these rules. -Adam On Wed, 30 Mar 2005 1

Re: this scope

2005-03-30 Thread Aaron Rouse
Actually those are not the only examples that refer to it from MACR. I was reading through some of the docs a couple weeks back in regards to CFCs and it was used quite a bit in there. On Wed, 30 Mar 2005 13:28:43 -0700, Paul <[EMAIL PROTECTED]> wrote: > I've been avoiding the "this" scope in my

RE: THIS scope

2005-02-24 Thread Adrian Lynch
THIS scope LOL - there's a book I'll have to look out for and follow it religiously ;-) -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, 25 February 2005 9:21 To: CF-Talk Subject: RE: THIS scope Someone's been reading The Pragmatic Programmer! Are

RE: THIS scope

2005-02-24 Thread James Holmes
LOL - there's a book I'll have to look out for and follow it religiously ;-) -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, 25 February 2005 9:21 To: CF-Talk Subject: RE: THIS scope Someone's been reading The Pragmatic Programmer! Are you

RE: THIS scope

2005-02-24 Thread Adrian Lynch
e- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, 25 February 2005 9:07 To: CF-Talk Subject: RE: THIS scope I agree with your thoughts, I'm glad you put into words what I think about OO and CF. An all or nothing approach seems to put many people off and no one seems to advo

RE: THIS scope

2005-02-24 Thread James Holmes
Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, 25 February 2005 9:07 To: CF-Talk Subject: RE: THIS scope I agree with your thoughts, I'm glad you put into words what I think about OO and CF. An all or nothing approach seems to put many people off and no one seems to advocate a slow move int

RE: THIS scope

2005-02-24 Thread Adrian Lynch
pplied to everything we do. Ade -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: 25 February 2005 01:00 To: CF-Talk Subject: Re: THIS scope I'm an advocate of OOP but not a zealot. There are times when I see someone create a class lik

Re: THIS scope

2005-02-24 Thread S . Isaac Dealey
> Well, yeah. That's a way to do it. > Is anyone else conflicted as to how many workaround we > should make to > enable OOP in CF when we're already able to develop some > pretty nice > applications? > -Joe I'm an advocate of OOP but not a zealot. There are times when I see someone create a cla

RE: THIS scope

2005-02-24 Thread Dave Watts
> In retrospect I believe the cfinvoke tag will allow you to > execute a method of a CFC without invoking the CFC ... It's worth pointing out that this will in fact create an instance of the CFC itself. However, because you're not storing a reference to that instance anywhere, you won't have any

Re: THIS scope

2005-02-24 Thread Isaac Dealey
>> That doesn't really cover "static," though - what makes a >> static >> member static is that it belongs to the type instead of >> one instance >> of a type. I.e.: >> >> InstanceOne.StaticVar = 1 >> InstanceTwo.StaticVar = 2 >> >> >> #InstanceOne.StaticVar# > >Application.cfc >- onapplicationst

Re: THIS scope

2005-02-24 Thread S . Isaac Dealey
I still fail to understand why it's considered messy / nasty. > If you let the 'final' part of 'public static final' weigh > in > slightly, then Isaac's proposal kind of gives you static. > Because > it's a method not a variable, there is only one instance > (so it's a > class "thing"), you can't

Re: THIS scope

2005-02-24 Thread S . Isaac Dealey
> Mostly because if you're looking for a field, > you're not going to look in the methods section > of the class docs, even if the "field" is > actually a method, as you proposed. Just a > differentiation between > state and behaviour that you'd sacrifice. If I knew the data was in that class (or

Re: THIS scope

2005-02-23 Thread Barney Boisvert
If you let the 'final' part of 'public static final' weigh in slightly, then Isaac's proposal kind of gives you static. Because it's a method not a variable, there is only one instance (so it's a class "thing"), you can't change it like a non-final variable. It's messy and nasty, which is why I p

Re: THIS scope

2005-02-23 Thread Barney Boisvert
Mostly because if you're looking for a field, you're not going to look in the methods section of the class docs, even if the "field" is actually a method, as you proposed. Just a differentiation between state and behaviour that you'd sacrifice. cheers, barneyb On Wed, 23 Feb 2005 18:37:09 -0500,

RE: THIS scope

2005-02-23 Thread James Holmes
Thanks all for the very interesting info. BTW, who doesn't have 50 Gmail invites and no friends ;-) -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Thursday, 24 February 2005 8:24 To: CF-Talk Subject: Re: THIS scope Amen to that, brother Joe! On Wed, 2

Re: THIS scope

2005-02-23 Thread Barney Boisvert
Amen to that, brother Joe! On Wed, 23 Feb 2005 19:17:23 -0500, Joe Rinehart <[EMAIL PROTECTED]> wrote: > Well, yeah. That's a way to do it. > > Is anyone else conflicted as to how many workaround we should make to > enable OOP in CF when we're already able to develop some pretty nice > applicati

Re: THIS scope

2005-02-23 Thread Joe Rinehart
Well, yeah. That's a way to do it. Is anyone else conflicted as to how many workaround we should make to enable OOP in CF when we're already able to develop some pretty nice applications? -Joe On Wed, 23 Feb 2005 18:37:07 -0500, S. Isaac Dealey <[EMAIL PROTECTED]> wrote: > Application.cfc >

Re: THIS scope

2005-02-23 Thread S . Isaac Dealey
I'm not sure why having it listed as a function in the documentation would be terribly bad... especially if it is a function and not a variable... I'd use a hint attribute to indicate the purpose of the function. I could see some developers thinking it was an odd practice, but I'd be hard pressed t

Re: THIS scope

2005-02-23 Thread S . Isaac Dealey
Application.cfc - onapplicationstart then reference the information as server.myStaticClass.getStaticVar(); there ya go. It's not _technically_ a static class, but it's as close as CF offers. > That doesn't really cover "static," though - what makes a > static > member static is that it belo

Re: THIS scope

2005-02-23 Thread Barney Boisvert
Yeah, but then you've got a method, not a field. Those extra parens aren't a huge deal to type every time, but having the psuedo-field listed with the other methods rather than as a field in generated documentation is a pain, as is the inability to use CFPROPERTY to document the field. cheers, ba

Re: THIS scope

2005-02-23 Thread Joe Rinehart
That doesn't really cover "static," though - what makes a static member static is that it belongs to the type instead of one instance of a type. I.e.: InstanceOne.StaticVar = 1 InstanceTwo.StaticVar = 2 #InstanceOne.StaticVar# On Wed, 23 Feb 2005 16:52:52 -0500, S. Isaac Dealey <[EMAIL PROTEC

Re: THIS scope

2005-02-23 Thread S . Isaac Dealey
> I use the 'this' scope for what would be public static > final variable > in Java. That is, values that are of use both inside and > outside a > class, but never change. CF doesn't give you the ability > to actually > make them read-only (or make them class fields, rather > than instance > fiel

Re: THIS scope

2005-02-23 Thread Barney Boisvert
I use the 'this' scope for what would be public static final variable in Java. That is, values that are of use both inside and outside a class, but never change. CF doesn't give you the ability to actually make them read-only (or make them class fields, rather than instance fields), but that's an

Re: THIS scope

2005-02-23 Thread Thomas Chiverton
On Wednesday 23 Feb 2005 09:03 am, James Holmes wrote: > Does anyone use the THIS scope any more? Having just converted some nasty I put public attributes and simple things that aren't worth writing a get and set for in it. -- Tom Chiverton Advanced ColdFusion Programmer ~

Re: THIS scope

2005-02-23 Thread S . Isaac Dealey
> Does anyone use the THIS scope any more? Having just > converted some nasty > old (CF 6.0) CFCs using THIS in external code and all > sorts of other bad > things to really nice, new, VARIABLES scope code using > getters and setters, > I can't see a use for THIS, except for the return in an > init

Re: THIS scope

2005-02-23 Thread S . Isaac Dealey
> Does anyone use the THIS scope any more? Having just > converted some nasty > old (CF 6.0) CFCs using THIS in external code and all > sorts of other bad > things to really nice, new, VARIABLES scope code using > getters and setters, > I can't see a use for THIS, except for the return in an > init

Re: THIS scope

2005-02-23 Thread Joe Rinehart
James, I use the "THIS" scope for creating complex types to be sent over Web Services. I think that's about the only time I use it anymore. -Joe On Wed, 23 Feb 2005 17:03:43 +0800, James Holmes <[EMAIL PROTECTED]> wrote: > Does anyone use the THIS scope any more? Having just converted some nas

Re: THIS scope

2005-02-23 Thread Duncan
Sorry - I should have mentioned I cut that from an earlier post from Sean to one of my questions. Duncan On Wed, 23 Feb 2005 01:35:58 -0800, Sean Corfield <[EMAIL PROTECTED]> wrote: > Strange... that's my response to another thread here on cf-talk...??? > > On Wed, 23 Feb 2005 20:11:42 +1100, Du

RE: THIS scope

2005-02-23 Thread James Holmes
-Talk Subject: Re: THIS scope Application.cfc effectively replaces the tag. This tag: becomes the following code in the pseudo-constructor area of Application.cfc (i.e., immediately after the opening tag): See the following documentation: Reference Manual: http://livedocs.macromedi

Re: THIS scope

2005-02-23 Thread Sean Corfield
Strange... that's my response to another thread here on cf-talk...??? On Wed, 23 Feb 2005 20:11:42 +1100, Duncan <[EMAIL PROTECTED]> wrote: > Application.cfc effectively replaces the tag. This tag: > > > > becomes the following code in the pseudo-constructor area of > Application.cfc (i.e., im

Re: THIS scope

2005-02-23 Thread Duncan
Application.cfc effectively replaces the tag. This tag: becomes the following code in the pseudo-constructor area of Application.cfc (i.e., immediately after the opening tag): See the following documentation: Reference Manual: http://livedocs.macromedia.com/coldfusion/7/htmldocs/069