All that means is that ColdFusion is returning a boolean. When it goes
across the pipe and is returned to Flex, it may be a different type
altogether.

I would suggest using an HTTP Proxy like Charles
(www.charlesproxy.com) to see exactly what is being returned over the
pipe.

As an aside, I find that Charles is indispensable when trying to debug
remote calls and results. It has saved me countless hours and is well
worth the cost.



--- In [email protected], "Scott" <[EMAIL PROTECTED]> wrote:
>
> Actually it does return a Boolean 
> 
> <cffunction name="userStatus" access="remote" returntype="boolean">
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Ralf Bokelberg
> Sent: Monday, July 14, 2008 8:58 AM
> To: [email protected]
> Subject: Re: [flexcoders] AS3 function returning true when it only
can be false
> 
> 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
> 
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>


Reply via email to