[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-10 Thread Charlie Arehart \(lists account\)
Thanks very much, Rod. /charlie -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rod Higgins Sent: Monday, July 09, 2007 11:54 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Struct notation - whats wrong with this? Hi Charlie, I

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Barry Beattie
Mike, I've got the wrong head on to day (my SQL one, the CF one is getting dusty at home) but IIRC, struct keys can't have numbers as names (at least at the start) segment[page_#counter#]thispage = counter; should work tho... On 7/10/07, Mike Kear [EMAIL PROTECTED] wrote: Ok I'm looking to

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread phaddon
On Tue, Jul 10, 2007 at 12:03:26PM +1000, Mike Kear wrote: Ok I'm looking to see where i'm wrong here. I guess i have incorrect syntax somewhere but i dont know where, or maybe you just can't do it the way i am trying to do it ... Here's what i want to end up with - a structure with the

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Andrew Scott
Mike, It is not very clear, how you have defined this. If segment is a struct, then you can't do segment[#counter#]. If it is and, segement.1 is an element of segement, then you can't use numbers as the beginning of the element name. I would have assumed that this would have been an array with

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Mike Kear
Yes! thanks Paul, that did work indeed. Barry you shouldn't be at work without your CF head on. So the lesson to learn is: 1.You CAN have a struct element name that is only a numeral. 2.The square-bracket notation requires a dot after it if what follows is to be another element name 3. there

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Dale Fraser
So is segment an array of structs? Ie cfset segment = arrayNew(1) / cfset segument[1] = structNew() / cfset segment[1].thispage = 1 / From what you have, it looks like the numbers are structs, which doesn't make sense, the array method makes more sense. Regards Dale Fraser

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread phaddon
On Tue, Jul 10, 2007 at 12:13:56PM +1000, Mike Kear wrote: Yes! thanks Paul, that did work indeed. Good This will also work: segment[#counter#]['thispage'] = counter; segment[#counter#]['nextpage'] = (counter + 1); segment[#counter#]['content'] = #contentelement#; Extending it further

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Andrew Scott
Wow, I am confused, I would have expected the .thispage to be the answer. But I did not expect that an element to a structure could begin with a number. The docs have always made it clear that these had to begin with alpha characters... Who would have thought. Andrew Scott Senior Coldfusion

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Dale Fraser
: Tuesday, 10 July 2007 12:45 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Struct notation - whats wrong with this? Wow, I am confused, I would have expected the .thispage to be the answer. But I did not expect that an element to a structure could begin with a number. The docs have always

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Andrew Scott
12:52 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Struct notation - whats wrong with this? Mike, I still don't get why you would do this when there is a perfectly good hidden feature in ColdFusion called ARRAYS. Regards Dale Fraser http://dalefraser.blogspot.com No virus found

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Charlie Arehart \(lists account\)
: Monday, July 09, 2007 10:14 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Struct notation - whats wrong with this? Yes! thanks Paul, that did work indeed. Barry you shouldn't be at work without your CF head on. So the lesson to learn is: 1.You CAN have a struct element name

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Mike Kear
Charlie I'm sure it is documented somewhere. Those docs are very comprehensive. But right now, with a deadline against me and the search on CFDocs not bringing something up about it, I used the rather rash statement that it's not covered. I probably shouldnt have said that. As to the reason

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Andrew Scott
. www.aegeon.com.au Phone: +613 8676 4223 Mobile: 0404 998 273 -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dale Fraser Sent: Tuesday, 10 July 2007 1:09 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Struct notation - whats wrong

[cfaussie] Re: Struct notation - whats wrong with this?

2007-07-09 Thread Rod Higgins
posts - I must be banned .. :) Rgds Rod -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Charlie Arehart (lists account) Sent: Tuesday, 10 July 2007 1:00 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Struct notation - whats wrong