Just thought I would write it out again... Was not very clear the first time... Though I was not the one who was figured it out (i.e not at the keyboard)...
Basically, when the code errored in the For Loop it displayed the error while ignoring the write outputs from earlier iterations, so i looked where I thought it errored where it was actually erroring on a struct that didn't have that value. Serves me right for 1) not understanding For in cfscript 2) copying and modifying code that I did understand 100%... Now where was that form for the darwin awards... On Nov 26, 10:19 am, KC Kuok <kck...@gmail.com> wrote: > MrBuzzy was right... Though I was not the one at the keyboard... > > I had a writeouput in the for loop and was assuming it was breaking on > a one of the sub structs which had the key/value. Apparently when > something breaks in For Loop in cfscript, none of the writeoutputs > from the earlier iterations will display. So it was breaking on > another the sub struct. > > That's almost 4 hours of work/life I will never get back... > > Still save time rewriting the whole function > > @AC noted on the duplicate :) > > I think I should nominate myself for the Darwin awards. =S > > On Nov 26, 9:58 am, Adam chapman <a...@portplus.com> wrote: > > > Hey Chong, > > > Also consider using the duplicate() function when copying your structure.. > > > From what I understand, structCopy() may not create a deep copy of your > > structure, > > But rather a pointer to the original. So if you modify the original, it can > > sometimes cause > > some changes (desired or otherwise) in the copy. > > > Regards, > > Adam > > > -----Original Message----- > > From: KC Kuok [mailto:kck...@gmail.com] > > Sent: Wednesday, 25 November 2009 9:44 PM > > To: cfaussie > > Subject: [cfaussie] Re: Weird Problem Element is Undefined problem > > > Hi guys, > > > just finished reading the replies... I think the scope is probably the > > best shot, I will give that a go first thing in the morning... > > > I am leaning towards a scope issue, probably caused by a extended cfc > > having the identically named variable, i should really have checked > > for that first... though it will be weird because I call another value > > from the same struct a few lines before that with no dramas at all... > > > I will update you guys on what is the issue, once I find it. > > > Cheers, > > Chong > > > On Nov 25, 9:33 pm, Gavin Baumanis <b...@palcare.com.au> wrote: > > > I'm just shooting from the hip... > > > > Any chance this is an issue with nested loops? > > > There is buggish behaviour around nested loops / queries. > > > > I was so stumped (with my issue) I sent an email off to ben nadel and his > > > "Ask Ben" column for help; > > > The link > > > is;http://www.bennadel.com/blog/546-Referring-To-The-Proper-Row-Of-The-O... > > > > Just in case it turns out to be the same issue for you. > > > > Gavin. > > > > On 25/11/2009, at 16:37 , KC Kuok wrote: > > > > > When I try to get key value from a structure I get an error however if > > > > I do a dump function, I can see the struct AND the variable which is > > > > referred to similarly. > > > > > E.g. > > > > ... > > > > ThisValue = STRUCTVARIABLE.THISFOREIGNKEY; > > > > ... > > > > > I get > > > > > Element THISFOREIGNKEY is undefined in STRUCTVARIABLE > > > > > However If I do a dump function, dodump(STRUCTVARIABLE) or even dodump > > > > (STRUCTVARIABLE.THISFOREIGNKEY ) just before that line I can see the > > > > entire structure or just the value respectively. I can't see what is > > > > wrong, could this be a cfscript related bug ? Or am I missing > > > > something real obvious ? > > > > > One of the things I thought maybe wrong is the scope, but even then it > > > > does not seem that anything is wrong with it... > > > > > Dodump() is just a regular cffunction which passes the args to cfdump > > > > inside. > > > > > Any thoughts? > > > > > Thanks in advance! > > > > Chong > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > > Groups "cfaussie" group. > > > > To post to this group, send email to cfaus...@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > cfaussie+unsubscr...@googlegroups.com. > > > > For more options, visit this group > > > > athttp://groups.google.com/group/cfaussie?hl=en. > > > > As always, please contact me if I can be of any further assistance. > > > > Gavin "Beau" Baumanis > > > Senior Application Developer > > > PalCare P/L > > > > 657 Nicholson Street > > > Carlton North > > > Victoria, Australia, 3054 > > > > E: b...@palcare.com.au > > > P: +61 -3 9380 3513 > > > M: +61 -438 545 586 > > > W:http://www.palcare.com.au > > > -- > > > You received this message because you are subscribed to the Google Groups > > "cfaussie" group. > > To post to this group, send email to cfaus...@googlegroups.com. > > To unsubscribe from this group, send email to > > cfaussie+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.