Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
BSterner #1
CFC getter and whitespace
Wondering if this is a bug. Using the following code.
<cfapplication name="test" sessionmanagement="yes">
<cflock timeout="20" type="exclusive" scope="session">
<cfscript>
SESSION.cfcEmployee = createObject("component", "Employee");
SESSION.cfcEmployee.setFName("Joe");
getterVar = SESSION.cfcEmployee.getFName();
</cfscript>
</cflock>
<cfoutput>
SESSION.cfcEmployee.fname = #SESSION.cfcEmployee.fName#
getFName() = #Trim(SESSION.cfcEmployee.getFName())#
getterVar = #getterVar#
</cfoutput>
This is the output in the html source code...
SESSION.cfcEmployee.fname = Joe
getFName() =
Joe
getterVar = Joe
When I try to output the value directory w/my cfc 'getFName()' method, I
cannot get rid of the whitespace. I've tried using trim() to no avail. Any
thoughts?
BSterner Guest
-
Yahoo! Getter
Hi All, Let's say I want to write a script that: 1) Signs on to Yahoo! Mail for me. 2) Hits the 'Forward' button for each of my messages.... -
Reply to the list WAS Yahoo! Getter
Jerry Rocteur wrote: The list manager is right, and you should reply to the list :~). Do a "Group" reply or a "Reply to All" from your mail... -
[PHP-DEV] Property setter and getter in PHP5
Hi, On Sun, 20 Jul 2003, Masoud wrote: You can use C# for that ;) No really, I think the PHP 5 syntax is okay here, PHP is just not C#. ... -
[PHP-DEV] Property setter and getter in PHP5
Hi John I knew __get and __set available, but i want to told C# like syntax is a nice and clear syntax if available in php5 , so we dont need to... -
[PHP-DEV] Property setter and getter in PHP5
Hi Masoud, It's already available. See http://www.phppatterns.com/index.php/article/articleview/28/1/2/ "Masoud" <masoud@iranphp.net> wrote... -
Eddie #2
Re: CFC getter and whitespace
[url]http://awads.net/wp/2005/06/15/coldfusion-and-white-space/[/url]
Eddie Guest
-
Re: CFC getter and whitespace
You may have a carriage return in your string or other wierd characters,
which would not go away using the trim function. Maybe you can use a regular
expression to replace any non-alpha character with an empty string.
"BSterner" <webforumsuser@macromedia.com> wrote in message
news:dajodk$mgi$1@forums.macromedia.com...Any> Wondering if this is a bug. Using the following code.
>
> <cfapplication name="test" sessionmanagement="yes">
> <cflock timeout="20" type="exclusive" scope="session">
> <cfscript>
> SESSION.cfcEmployee = createObject("component", "Employee");
> SESSION.cfcEmployee.setFName("Joe");
> getterVar = SESSION.cfcEmployee.getFName();
> </cfscript>
> </cflock>
> <cfoutput>
> SESSION.cfcEmployee.fname = #SESSION.cfcEmployee.fName#
> getFName() = #Trim(SESSION.cfcEmployee.getFName())#
> getterVar = #getterVar#
> </cfoutput>
>
> This is the output in the html source code...
>
> SESSION.cfcEmployee.fname = Joe
> getFName() =
> Joe
> getterVar = Joe
>
>
> When I try to output the value directory w/my cfc 'getFName()' method, I
> cannot get rid of the whitespace. I've tried using trim() to no avail.> thoughts?
>
Guest



Reply With Quote

