Hii Nick,

None of these techniques/workarounds working for boolean.
I am really thinking that how other people dealing with boolean types?

Any other possible solution in your store??

Also, I am debugging this application in Flex builder and there it displays
that the returned object[in result] itself has a value of true, so there is
no use of trying to resolve it on Flex side. As it is receiving the boolean
value as true always.

Now it comes to WebORB, like how they are missing this bug[looks like that],
for such a long time.

Thanks,
Manu.


Uber_Nick wrote:
> 
> Manu,
> 
> Note the following.
> trace(Boolean('TRUE')); // returns true
> trace(Boolean('FALSE')); // also returns true
> 
> Flex is interpreting the result from your PHP call as a String.  Try
> returning lower-case 'true' and 'false'.  Also, try using:
> list[i].aircon as Boolean 
> instead of:
> Boolean(list[i].aircon)
> The former will not always convert to true (but will return null if it
> can't convert).  Lastly, if you can't make it work, just try this
> workaround:
> vo.aircon = (''+list[i].aircon).toLowerCase()=='true';
> 
> -Nick Matelli
> Amentra, Inc
> 
> --- In flexcoders@yahoogroups.com, Manu Dhanda <[EMAIL PROTECTED]> wrote:
>>
>> 
>> Code for my Responder, where I am receiving the result:
>>              public function result(data:Object):void
>>              {
>>                      //TODO: implement function
>>                      var objList:ArrayCollection = new ArrayCollection();
>>                      var list:ArrayCollection = new 
>> ArrayCollection(data.result as Array);
>>                      var vo:FlatVO;
>>                      for(var i:int=0; i<list.length; i++){
>>                              vo = new FlatVO();
>>                              vo.userId = int(list[i].userId);
>>                              vo.aircon = Boolean(list[i].aircon);
>>                              objList.addItem(vo);
>>                      }
>> 
>> In here, I supposed to get vo.aircon as boolean[values as true/false for
>> different rows/objects in FlatVO]. But, the strange thing is that I am
>> receiving all the values for my boolean type as TRUE only.
>> 
>> I had verified on my server side PHP code, and it is returning the
>> corresponding values fine [as in TRUE and FALSE accordingly].
>> 
>> I am using WebORB for PHP with Flex. and in there, I had verified in the
>> Services as well, that my service returning this object has the right
>> values. Then how come I am receiving all the values as TRUE, I can not
>> understand this.
>> 
>> Any help will be great.
>> Thanks.
>> 
>> Igor Costa-2 wrote:
>> > 
>> > If you paste a part of your code someone here in the list can
> answer you
>> > but
>> > it's hard to get what you really need.
>> > 
>> > 
>> > Regards
>> > Igor
>> > 
>> > On Tue, Jun 3, 2008 at 11:45 AM, Manu Dhanda <[EMAIL PROTECTED]>
>> > wrote:
>> > 
>> >>
>> >> Hii,
>> >>
>> >> In short, In Weborb Mgmt Services, I can see the object having a
> value of
>> >> boolean type correctly.( that is it is returned correctly from
> the db).
>> >> But when I receive it on Flex side, all is returned as true.
>> >>
>> >> How should I resolve this?
>> >>
>> >> Appreciate your time.. to respond it.
>> >>
>> >> thanks.
>> >>
>> >> --
>> >> View this message in context:
>> >>
> http://www.nabble.com/Flex-%2B-WebORB-for-PHP%2C-A-very-strage-problem-tp17625304p17625304.html
>> >> Sent from the FlexCoders mailing list archive at Nabble.com.
>> >>
>> >> 
>> >>
>> > 
>> > 
>> > 
>> > -- 
>> > ----------------------------
>> > Igor Costa
>> > www.igorcosta.com
>> > www.igorcosta.org
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
> http://www.nabble.com/Flex-%2B-WebORB-for-PHP%2C-A-very-strange-problem-tp17625304p17631029.html
>> Sent from the FlexCoders mailing list archive at Nabble.com.
>>
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Flex-%2B-WebORB-for-PHP%2C-A-very-strange-problem-tp17625304p17645099.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to