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
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
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
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.
Thanks Ben will let you know if it was successful, but am confident
that this will work given your explanation.
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
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
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
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"
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
{
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
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
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
] 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
can someone please help me out here..thanks
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
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
17 matches
Mail list logo