Re: [flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-17 Thread Haykel BEN JEMIA
You have to review the logic of your filter function. As Tracy said, you should try to debug, this will save you a lot of time. Put a break point in the filter function and test your conditions. Haykel Ben Jemia Allmas Web & RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 1:2

RE: [flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-17 Thread Tracy Spratt
lf Of Tim Hoff Sent: Tuesday, February 17, 2009 12:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: filter arraycollection with checkbox acting wired This is asolutely comical. -TH --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "johndoematrix

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-17 Thread Tim Hoff
This is asolutely comical. -TH --- In flexcoders@yahoogroups.com, "johndoematrix" wrote: > > hi Ben when i tried the solution you gave, it worked very very well. > but this is when am using a single criteria. when i try to add it to a > filter function that filter's based on more than one crite

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-17 Thread johndoematrix
hi Ben when i tried the solution you gave, it worked very very well. but this is when am using a single criteria. when i try to add it to a filter function that filter's based on more than one criteria that's when there come's a problem.

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-17 Thread johndoematrix
Thanks Ben will let you know if it was successful, but am confident that this will work given your explanation.

Re: [flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-17 Thread Haykel BEN JEMIA
It seems like your data is OK. So I did a test application and I figured out that the filter function is wrong. It should only do the test if the checkbox is selected, otherwise it should always return true because in this case you want display all items. So here is my working test app, I hope you

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-17 Thread johndoematrix
sorry i had forgotten to trace the item.pool. anyhow when i do that and i click the check box once i get true false true false true true when i click five times i get true false true false true true false false true false true true true false true false true true false false true false true true tr

Re: [flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-17 Thread Haykel BEN JEMIA
Can you click on the checkbox more than once (let's say 5 times) and resend the output? Haykel Ben Jemia Allmas Web & RIA Development http://www.allmas-tn.com On Tue, Feb 17, 2009 at 8:57 AM, johndoematrix wrote: > when i replace the code and run the app, i get the following output > when

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-16 Thread johndoematrix
when i replace the code and run the app, i get the following output when i click the pizza_ckb checkbox and all the info disappears "[SWF] /IE_V1/bin/portal_V1-debug.swf - 2,109,478 bytes after decompression true"

Re: [flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-16 Thread Haykel BEN JEMIA
Replace the following functions, run the app in debug mode and post the output: private function pizzaFilter():void { trace(pizza_ckb.selected); if ( == true) pizzaSelected = pizza_ckb.data; filterGrid(); pizzaAr.refresh(); } private function myFilterFunction(item:Object): Boolean {

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-16 Thread johndoematrix
Hi, Tim i tried your code, but the result is not good too. when then check box is checked, all the data in the array collection disappears and when its unchecked all data shows up again. what i want to achieve is when the pizza_ckb is checked only the entries in the data base that have pizza show u

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-16 Thread Tim Hoff
Hi, There's a few problems with your original code. First, pizzaSelected will never change after the first click of the CheckBox; because you're only setting it if the CheckBox is selected. Also not sure why you don't just use pizzaSelected = pizza_ckb.selected; instead of pizza_ckb.data, or wh

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-14 Thread johndoematrix
i have tried every advise provide so far and still doesn't work. this is the senario, in my database i have a column(Field Name) for pizza with Data Type "YES/NO". i display everything in a flex app through a arraycollection and want to filter that data. i use a checkbox to filter data if there is

RE: [flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-13 Thread Tracy Spratt
] On Behalf Of johndoematrix Sent: Friday, February 13, 2009 10:54 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: filter arraycollection with checkbox acting wired can someone please help me out here..thanks

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-13 Thread johndoematrix
can someone please help me out here..thanks

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-10 Thread johndoematrix
hi tried all that but no head way. in my data base i have a pizza column which is either yes or no(yes/no) now i have some entries as yes and some as no so that when someone checks the checkbox it shows those items that are yes in the database. i am following this example, the difference is that fo

[flexcoders] Re: filter arraycollection with checkbox acting wired

2009-02-09 Thread hfmarino
Hi, try private function myFilterFunction(item:Object): Boolean { trace("item.pizza " + item.pizza); return (item.pizza == pizzaSelected) ; } Look at the console, maybe you have all item.pizza == false. Henrique F. Marino blog.dclick.com.br www.dclick.com.br --- In flexcoders@yaho