RE: An issue with CFC output
Thanks I thought that the default was false. if output="false" is not in the function tag the extra charaters show up. I just had: IIRC there was once an issue where if there is no output parameter, one got behavior that was neither true or false, but something sort of in between. This may have been fixed in subsequent updates. But I have long ago gotten in the habit of always declaring my output choice, almost always false, but once in a blue moon, true. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240282 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: An issue with CFC output
What about Trimming the result? #Trim(Myobject.myfunction(oldstring))# What happens when you do this:? [#Myobject.myfunction(oldstring)#] -Original Message- From: Bruce, Rodney S C-E LCMC HQISEC/Signal Solutions [mailto:[EMAIL PROTECTED] Sent: Thursday, May 11, 2006 2:44 PM To: CF-Talk Subject: An issue with CFC output Hi all Hope I can explain this. Has anyone encountered an issue with outputing a returned string from a CFC method? I have a CFC that has a function that returns a string. The function use to just be on a .cfm page that I . We have just recently upgraded to CFMX 7, so I wanted to get my functions into CFCs. using If I do this: #newstring# All is good But if I do #Myobject.myfunction(oldstring)# I get extra non printable chars in front of the output. After expermenting for awhile, I can see that the extra chars are being placed in front of the returned string at the time of output. Not by the function itself. If I do: I get no extra chars. The extra chars are added at the function dump to output #Myobject.myfunction(oldstring)#. Were this is an issue is in queries: SET field1 = #Myobject.myfunction(oldstring1)#, feidl2 = #Myobject.myfunction(oldstring2)#, . I would have to do a bunch of cfsets before the query. Do able but annoying to have the extra lines of code or place the output into a rereplace expression. Thanks for any help Rodney ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240276 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: An issue with CFC output
If you do not specify the output attribute, it will behave like a normal block of cf code that is not between tags and generate all sorts of white space. If you specify output="true", the cffunction tags will act just like tags and evaluate any text that is between #s. If you specify output="false", the cffunction tags behave like tags. Not entirely obvious, I know. On 5/11/06, Bruce, Rodney S C-E LCMC HQISEC/Signal Solutions < [EMAIL PROTECTED]> wrote: > > Thanks > > I thought that the default was false. > > if output="false" is not in the function tag the extra charaters show up. > I just had: > > > > > > > -Original Message- > From: Ian Skinner [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 11, 2006 12:52 PM > To: CF-Talk > Subject: RE: An issue with CFC output > > > Without seeing more of your CFC code, I would hazard a guess that you need > to add output="false" to your function declarations. Otherwise white > space > generated in the function can be passed onto the calling page. > > HTH > > If not, give us a better example of your CFC and relevant function. > > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged information. Any > unauthorized review, use, disclosure or distribution is prohibited. If you > are not the intended recipient, please contact the sender and delete any > copies of this message. > > > > > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240274 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: An issue with CFC output
Thanks I thought that the default was false. if output="false" is not in the function tag the extra charaters show up. I just had: -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Thursday, May 11, 2006 12:52 PM To: CF-Talk Subject: RE: An issue with CFC output Without seeing more of your CFC code, I would hazard a guess that you need to add output="false" to your function declarations. Otherwise white space generated in the function can be passed onto the calling page. HTH If not, give us a better example of your CFC and relevant function. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240270 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: An issue with CFC output
Without seeing more of your CFC code, I would hazard a guess that you need to add output="false" to your function declarations. Otherwise white space generated in the function can be passed onto the calling page. HTH If not, give us a better example of your CFC and relevant function. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240266 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
An issue with CFC output
Hi all Hope I can explain this. Has anyone encountered an issue with outputing a returned string from a CFC method? I have a CFC that has a function that returns a string. The function use to just be on a .cfm page that I . We have just recently upgraded to CFMX 7, so I wanted to get my functions into CFCs. using If I do this: #newstring# All is good But if I do #Myobject.myfunction(oldstring)# I get extra non printable chars in front of the output. After expermenting for awhile, I can see that the extra chars are being placed in front of the returned string at the time of output. Not by the function itself. If I do: I get no extra chars. The extra chars are added at the function dump to output #Myobject.myfunction(oldstring)#. Were this is an issue is in queries: SET field1 = #Myobject.myfunction(oldstring1)#, feidl2 = #Myobject.myfunction(oldstring2)#, . I would have to do a bunch of cfsets before the query. Do able but annoying to have the extra lines of code or place the output into a rereplace expression. Thanks for any help Rodney ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240262 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54