It appears to me, that your Coldfusion script returns a string instead
of a boolean. Every string with a length > 0 evaluates to true in a
boolean expression.
Cheers
Ralf.
On Mon, Jul 14, 2008 at 4:05 PM, Scott <[EMAIL PROTECTED]> wrote:
> This is weird…
>
>
>
> I'm linking to a coldfusion component I'm creating.
>
>
>
> For the sake of playing around a bit, I created the variable "rc"
>
>
>
> The following AS3 function queries the CF server to see if the user is
> logged in or not; returns true for yes, false for no
>
>
>
> public function userStatus():Boolean
>
> {
>
> rc = authManager.userStatus();
>
> return rc;
>
> }
>
>
>
> That function always returns "true", even though the coldfusion query is now
> set to return false for both cases as you see below.
>
>
>
> This is the coldfusion function:
>
>
>
> <cffunction name="userStatus" access="remote" returntype="boolean">
>
> <cfif IsUserLoggedIn()>
>
> <cfreturn false> ß-- this is normally true but set it to false
> to verify what is going on
>
> <cfelse>
>
> <cfreturn false>
>
> </cfif>
>
> </cffunction>
>
>
>
>
>
> This is the actual Flex display/call:
>
> <mx:Text text = "{'Logged in? ' + idLoginForm.userStatus()}"/>
>
>
>
> This displays the following:
>
>
>
> Logged in? True
>
>
>
> Any idea on what is going on here?
>
>
>
>
>
> (as a side note, I can't set a break point in that function. The break
> point keeps moving to the bottom of the function and out of the scope of the
> variable so I can't watch it.)
>
>
>
>
>
> Thanks!
>
>
--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
------------------------------------
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/