fnicollet / flex-datafilterlib

Automatically exported from code.google.com/p/flex-datafilterlib
0 stars 0 forks source link

Creating DataSetFilter in Actionscript #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, 

This is a very useful library.

However when trying to dynamically create filters in actionscript I have run 
into some problems. 
It seems you have to call the addDataFilter function before you set the 
filterValues on a 
DataFilterParameters object. Otherwise, the filter does not work.

for e.g.

this works:
var filter : DataFilterParameters = new DataFilterParameters();
dataFilterSet.addDataFilter( filter );
filter.filterValues = [false];

this does not:
var filter : DataFilterParameters = new DataFilterParameters();
filter.filterValues = [false];
dataFilterSet.addDataFilter( filter );

It would also be good if there was an actual actionscript example to follow. 

Thanks.

Original issue reported on code.google.com by yahmad...@hotmail.com on 19 Nov 2009 at 11:22

GoogleCodeExporter commented 9 years ago
I'm gonna try to write a AS example for the DataFilterLib and post it here.
Sorry for the delay, i thought i would get an email when someone raise an issue 
but
well, i didn't

Fabien

Original comment by fnicol...@gmail.com on 16 Apr 2010 at 1:50

GoogleCodeExporter commented 9 years ago
hello , i'm using your library for my school projects and as said before i'm 
facing 
many problems while using this library with AS3 , could you please give us more 
examples for adding filters dynamically.

thanks in advance

Original comment by othmane....@gmail.com on 31 May 2010 at 11:39

GoogleCodeExporter commented 9 years ago
Ok, i'm gonna post an example on my blog (flex-tutorial.fr), in english, surely
tonight. I'll send the link in a comment on this page.
Fabien

Original comment by fnicol...@gmail.com on 1 Jun 2010 at 12:02

GoogleCodeExporter commented 9 years ago
Hi,
here is the blog post on how to use the DataFilterLib only using ActionScript:
http://www.flex-tutorial.fr/2010/06/01/datafilterlib-using-the-datafilterlib-wit
h-actionscript-code-only/
It's on a french blog but it's written in english, don't worry :).
I can write some more AS examples but if you have understood this one, i think 
you
should be able to reproduce any other example with no problem.
If you need some more AS examples or some help on your project, i'll be glad to 
help.
Just send me an email at fnicollet (AT) gmail (.) com

Cheers,
Fabien

Original comment by fnicol...@gmail.com on 1 Jun 2010 at 8:40

GoogleCodeExporter commented 9 years ago

Original comment by fnicol...@gmail.com on 1 Jun 2010 at 8:41

GoogleCodeExporter commented 9 years ago
In reading the very first post, I too had the exact same issue.  I read your 
post about how to use it in actionscript that the primary difference is that 
you are setting the filterValue via a UI component where the original poster 
and I want to set it to a value while creating the parameters.  

I made the following change to the DataFilterSingleValue.as constructor and it 
worked the way as the original poster would like:

    public function DataFilterSingleValue(parameters:DataFilterParameters) {
      super(parameters);
      // change starts here
      if( parameters != null ) {
          _values = parameters.filterValues;
      }
      // change ends here
    }

Would you consider making this change part of the code base?

Original comment by theyoung...@gmail.com on 27 Jun 2010 at 1:36

GoogleCodeExporter commented 9 years ago
Thanks for this patch, it is now committed in the trunk version. I am going to 
make a minor release set it as latest

Thanks!
Fabien

Original comment by fnicol...@gmail.com on 27 Jun 2010 at 1:58

GoogleCodeExporter commented 9 years ago
Thank you for such great response time.  I will update my local project with 
your new version.

Thanks again

Original comment by theyoung...@gmail.com on 27 Jun 2010 at 5:16

GoogleCodeExporter commented 9 years ago
If you run into any issue or you would like some new feature to be implemented, 
please ask (in here or on my email)

Have a nice day
Fabien

Original comment by fnicol...@gmail.com on 27 Jun 2010 at 5:18