RE: odd error calling function in cfc
Yeah, reserved word seems unlikely. Chances are you're overwriting add_option somewhere or the scoping is out somehow. I notice there's no var scope on your getOptions query, var scope everything and see it that sorts things. It's hard to say more without seeing the full CFC mind. Adrian -Original Message- From: Charlie Griefer [mailto:charlie.grie...@gmail.com] Sent: 16 August 2009 04:24 To: cf-talk Subject: Re: odd error calling function in cfc I'd be really surprised if that was the actual issue. if add_option was a reserved word, your initial iteration of the loop would have thrown the error (you said it would successfully complete the first iteration and then break). I'm not sure what the issues is, I'm just saying I'd be surprised if it turned out to be the variable name, in this case :) On Sat, Aug 15, 2009 at 7:57 PM, Mike Little m...@nzsolutions.co.nz wrote: you kow what is was... it was the name of the function add_option - i have renamed to add_new_option and it works. if someon could explain that one?? is it a reserved word? You don't really need the CFIF test, since CFOUTPUT will only render if there are records. Simplify like the example below and see if it still gives you trouble. If it does, then check that the add_option() method isn't erroring ... cfoutput query=getOptions cfset add_option(product_id=arguments.product_id, product_option_title=product_option_title) /cfoutput ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325481 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: odd error calling function in cfc
You don't really need the CFIF test, since CFOUTPUT will only render if there are records. Simplify like the example below and see if it still gives you trouble. If it does, then check that the add_option() method isn't erroring ... cfoutput query=getOptions cfset add_option(product_id=arguments.product_id, product_option_title=product_option_title) /cfoutput ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325477 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: odd error calling function in cfc
you kow what is was... it was the name of the function add_option - i have renamed to add_new_option and it works. if someon could explain that one?? is it a reserved word? You don't really need the CFIF test, since CFOUTPUT will only render if there are records. Simplify like the example below and see if it still gives you trouble. If it does, then check that the add_option() method isn't erroring ... cfoutput query=getOptions cfset add_option(product_id=arguments.product_id, product_option_title=product_option_title) /cfoutput ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325478 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: odd error calling function in cfc
I'd be really surprised if that was the actual issue. if add_option was a reserved word, your initial iteration of the loop would have thrown the error (you said it would successfully complete the first iteration and then break). I'm not sure what the issues is, I'm just saying I'd be surprised if it turned out to be the variable name, in this case :) On Sat, Aug 15, 2009 at 7:57 PM, Mike Little m...@nzsolutions.co.nz wrote: you kow what is was... it was the name of the function add_option - i have renamed to add_new_option and it works. if someon could explain that one?? is it a reserved word? You don't really need the CFIF test, since CFOUTPUT will only render if there are records. Simplify like the example below and see if it still gives you trouble. If it does, then check that the add_option() method isn't erroring ... cfoutput query=getOptions cfset add_option(product_id=arguments.product_id, product_option_title=product_option_title) /cfoutput ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325479 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4