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
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
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
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
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
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
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
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
: 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
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
: 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
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
.
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
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
14 matches
Mail list logo