RE: [CFCDev] Speaking of Structures

2006-02-26 Thread Jim Davis
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Powell Sent: Friday, February 24, 2006 9:33 AM To: CFCDev@cfczone.org Subject: RE: [CFCDev] Speaking of Structures What you're trying to use is called implicit getters and setters.  It

[CFCDev] Simple Scoping Question

2006-02-26 Thread Peter Bell
Title: Message Hi There, Sorry for such a basic question, but if I want to create a page request specificobject in onRequestStart (in application.cfc) which will contain a bunch of properties I need access to whether I'm using a browser or flash remoting to access the application, how do

[CFCDev] Please ignore Simple Scoping Question

2006-02-26 Thread Peter Bell
Title: Message And after spending an hour looking for this before posting,of course I find the answer on the next page I looked at in the cf docs. Answer of course is to set the variable as Request.myPageRequest in the onRequestStart and then to call it the same way in index.cfm. Tested and

RE: [CFCDev] Simple Scoping Question

2006-02-26 Thread David Harris
Title: Message would: cfset request.myPageRequest = CreateObject("component","prototype.entity.systemsforge.PageRequest").Init() not the best "OO" practice I suspect... -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter BellSent:

Re: [CFCDev] Speaking of Structures

2006-02-26 Thread Barry Beattie
What you're trying to use is called implicit getters and setters. It is implemented in AS 2.0, but has not yet made its way to CF does anyone honestly think that CF will ever get implicit getters and setters? I thought it'd be too late now to introduce ...just curious. barry.b

[CFCDev] Calling an object with a variablized name without using evaluate?

2006-02-26 Thread Peter Bell
Title: Message Hi There, I know it's a best practice to not use "evaluate" (for performance purposes) so was wondering ifanyone had any ideas on removing it from this situation. - I have a set of page objects in application scope with various properties and methods. - Each page

RE: [CFCDev] Calling an object with a variablized name without using evaluate?

2006-02-26 Thread David Harris
Title: Message would this work?: cfset THIS.page =Application.page[pagename]) -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter BellSent: Monday, 27 February 2006 12:35 p.m.To: CFCDev@cfczone.orgSubject: [CFCDev] Calling an

Re: [CFCDev] Calling an object with a variablized name without using evaluate?

2006-02-26 Thread Shib71
cfset this.page = application.page[pagename]BlairOn 2/27/06, Peter Bell [EMAIL PROTECTED] wrote: Hi There, I know it's a best practice to not use evaluate (for performance purposes) so was wondering ifanyone had any ideas on removing it from this situation. - I have a set of page

RE: [CFCDev] Calling an object with a variablized name without using evaluate?

2006-02-26 Thread Peter Bell
Title: Message David and Blair, Many thanks - works perfectly. So embarassing to know programming but not syntax! Best Wishes, Peter -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David HarrisSent: Sunday, February 26, 2006 6:39

RE: [CFCDev] Speaking of Structures

2006-02-26 Thread Roland Collins
Well it _does_ have them when using certain types of interfaces, like web services, so I don't think that it's too far off base... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Beattie Sent: Sunday, February 26, 2006 6:27 PM To: CFCDev@cfczone.org

RE: [CFCDev] Speaking of Structures

2006-02-26 Thread Andrew Powell
I wouldn't say it will never happen, just submit a request to the wishlist and see what comes of it ap -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roland Collins Sent: Sunday, February 26, 2006 8:29 PM To: CFCDev@cfczone.org Subject: RE:

Re: [CFCDev] reset Var Scoping?

2006-02-26 Thread Chris Scott
Local variables need to be defined at the top of methods declarations, after any arguments, and before any other statements. So no that would not work. You probably would not want to try to do something like that anyway. On Feb 26, 2006, at 9:48 PM, Ung, Seng wrote: Instead of setting each local

RE: [CFCDev] reset Var Scoping?

2006-02-26 Thread Peter Bell
Title: Message How about this: !--- define a local scope --- cfset var local = structnew() cfset local.tmpVar="a,b,c,d"cfloop list="#local.tmpVar#" index="i" cfset "local.#i#" = ""//cfloop Best Wishes, Peter -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [CFCDev] reset Var Scoping?

2006-02-26 Thread Ryan Guill
No, you cant do this because the VAR statements must be the first thing after the cfarguments and before any other code. If you are worried about typing the three characters each time, you can do this: cfset VAR localStruct = structNew() / and then anything you stick in the localStruct will be

Re: [CFCDev] reset Var Scoping?

2006-02-26 Thread Chris Scott
OK that being said, if you're desperate to do something like simplify those local variable defs, you could do the following:cfset var locals = StructNew() /cfset var varNames = "a,b,c,d,e" /cfset var i = "" /cfloop list="#varNames#" index ="i" cfset locals[i] = "" //cfloopOne thing. a,b,c,d...

RE: [CFCDev] reset Var Scoping?

2006-02-26 Thread Ung, Seng
Master: Got it. I learned a lot from all of you Thanks -Original Message-From: Chris Scott [mailto:[EMAIL PROTECTED]Sent: Sunday, February 26, 2006 7:17 PMTo: CFCDev@cfczone.orgSubject: Re: [CFCDev] reset Var Scoping?OK that being said, if you're desperate to do

[CFCDev] Collections

2006-02-26 Thread Peter Bell
Title: Message Single object (e.g. product) use the business entity object - e.g. product Editing single object - product.Save() method Deleting single object - product.Delete() method What object should return a filter list of products? What object should return anID list of products?