Bingo! Thank you!

 

I was just researching what [object AsyncToken] means and found an article 
referring to the AsyncToken not firing.  Unfortunately, they didn't have an 
answer... So what you are saying is falling in line with what I am starting to 
see here.

 

What causes the result event to fire/how can I force this to fire?

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy 
Spratt
Sent: Monday, July 14, 2008 12:17 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Re: AS3 function returning true when it 
only can be false

 

If " authManager.userStatus();" is a web service operation/method, then the 
call is asynchronous.  All you are testing is the existence of the userStatus 
method on the authManager object.

 

You can't access your result until the result event fires.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott
Sent: Monday, July 14, 2008 12:07 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: AS3 function returning true when it only can be 
false

 

Coldfusion is just the webservice that is being called from Flex. For some 
reason, flex isn't updating its code properly. I have run into this but never 
found the root cause or easy fix. I just recreated the application and 
continued on. I've had times where flex will lock open a file and it will not 
update and I'm forced to reboot the computer. (I did try that as well). I know 
when that happens though, when I hit project->clean I get an error that a file 
is open. I've closed everything off that I can see running on the computer but 
the file still remains open. The only way I found to clear that up is rebooting 
the computer (which is very annoying).

Another thing I'm seeing right now is that when I select a break point and 
debug the application, the program moves the break point to a location a few 
lines down. So it looks like it may be out of sync. It does this every where I 
try setting a break point.

-----Original Message-----
From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>  
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On 
Behalf Of Ralf Bokelberg
Sent: Monday, July 14, 2008 10:36 AM
To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
Subject: Re: [flexcoders] Re: AS3 function returning true when it only can be 
false

The compiler might have issues, but it seems to work pretty well most
of the time. I'm using it for years on a daily base. I have never used
Coldfusion though, so i cannot say anything about the interface
between Flex and Coldfusion. Anyways, a simple trace statement should
give you clarity about what is going on.

Good luck,
Ralf.

On Mon, Jul 14, 2008 at 5:52 PM, Scott <[EMAIL PROTECTED] 
<mailto:halo%40netprof.us> > wrote:
> I do have another function that returns bool and it does work ok... And for
> sake of argument I changed the "true" and "false" to 0 and 1 and had the
> same effect.
>
>
>
> I just noticed that another one of my functions isn't returning the correct
> information. It's returning the email address which was changed days ago.
> I've had similar things like this happen in the past when I was playing
> around with flex before being serious about developing with it. My solution
> then was to recreate the application and copy over the mxml files. I'm
> thinking something is stuck again with the compiler.
>
>
>
> Regardless, I'm going to look at that proxy. I've written a .cfm file to
> test the component and everything tests out ok.
>
>
>
> Has anyone had issues with things getting "stuck" in the compiler as well?
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>  
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On
> Behalf Of valdhor
> Sent: Monday, July 14, 2008 10:12 AM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: {Disarmed} [flexcoders] Re: AS3 function returning true when it
> only can be false
>
>
>
> 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 flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , 
> "Scott" <[EMAIL PROTECTED]> wrote:
>>
>> Actually it does return a Boolean
>>
>> <cffunction name="userStatus" access="remote" returntype="boolean">
>>
>> -----Original Message-----
>> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>  
>> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ]
> On Behalf Of Ralf Bokelberg
>> Sent: Monday, July 14, 2008 8:58 AM
>> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
>> 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 
>> <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> 
>> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
> <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.
>>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

-- 
Ralf Bokelberg <[EMAIL PROTECTED] <mailto:ralf.bokelberg%40gmail.com> >
Flex & Flash Consultant based in Cologne/Germany

------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
<http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> 
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
<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.

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is 
believed to be clean. 

Reply via email to