You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Oleg Konovalov <ol...@gmail.com> on 2014/06/10 15:36:33 UTC
Changing sort type
Hi,
We have a Flex4 DataGrid, which is totally dynamic, so I don't know in
advance number of columns or their types.
It is sorted on the first column, which we know is numeric: 1,2,3,4,...
But users might want to sort
on other columns, happens often,
and some numeric columns contain negative numbers.
So how can I set sort type dynamically, when I find out column data type,
after user click to sort it.
TIA,
Oleg.
Re: Changing sort type
Posted by Tom Chiverton <tc...@extravision.com>.
On 16/06/14 22:09, Oleg Konovalov wrote:
> What should I do?
Upgrade ?
Tom
Re: Changing sort type
Posted by Oleg Konovalov <ol...@gmail.com>.
I ended up still using Flex 4.5.1 numeric sortCompareFunction() and
determining which column used on DG headerOut event.
On Tue, Jun 17, 2014 at 12:10 PM, Tom Chiverton <tc...@extravision.com> wrote:
> On 17/06/14 16:54, Trevor Holman wrote:
>
>> I found it right after I sent the email
>>
> Ha ! Always the way !
>
> Tom
>
--
Thank you,
Oleg.
Re: Changing sort type
Posted by Tom Chiverton <tc...@extravision.com>.
On 17/06/14 16:54, Trevor Holman wrote:
> I found it right after I sent the email
Ha ! Always the way !
Tom
Re: Changing sort type
Posted by Trevor Holman <tr...@cqproducts.com>.
Ah, never mind… I found it right after I sent the email. sorry.
On Jun 17, 2014, at 10:13 AM, Tom Chiverton <tc...@extravision.com> wrote:
> On 17/06/14 16:05, Oleg Konovalov wrote:
>> Is it possible to upgrade Flex without upgrading FB?
> Totally. The installer on the Apache Flex web site will do everything for you, then you can just add that to the list of available SDKs in Builder.
>
> Tom
Re: Changing sort type
Posted by Trevor Holman <tr...@cqproducts.com>.
Adding the new flex to FB list. I did find it.
On Jun 17, 2014, at 10:52 AM, Tom Chiverton <tc...@extravision.com> wrote:
> On 17/06/14 16:51, Trevor Holman wrote:
>> How exactly do you go about doing that? I’m using FB 4.7
>>
> Which part? What have you tried already there ?
>
> Tom
Re: Changing sort type
Posted by Tom Chiverton <tc...@extravision.com>.
On 17/06/14 16:51, Trevor Holman wrote:
> How exactly do you go about doing that? I’m using FB 4.7
>
Which part? What have you tried already there ?
Tom
Re: Changing sort type
Posted by Trevor Holman <tr...@cqproducts.com>.
How exactly do you go about doing that? I’m using FB 4.7
On Jun 17, 2014, at 10:13 AM, Tom Chiverton <tc...@extravision.com> wrote:
> On 17/06/14 16:05, Oleg Konovalov wrote:
>> Is it possible to upgrade Flex without upgrading FB?
> Totally. The installer on the Apache Flex web site will do everything for you, then you can just add that to the list of available SDKs in Builder.
>
> Tom
Re: Changing sort type
Posted by Tom Chiverton <tc...@extravision.com>.
On 17/06/14 16:05, Oleg Konovalov wrote:
> Is it possible to upgrade Flex without upgrading FB?
Totally. The installer on the Apache Flex web site will do everything
for you, then you can just add that to the list of available SDKs in
Builder.
Tom
RE: Changing sort type
Posted by Oleg Konovalov <ol...@gmail.com>.
Hmm, sounds complicated.
Is it possible to upgrade Flex without upgrading FB? I mean, try using
Flex 4.12 32 bit with FB 4.5.1? Anybody had experience with that?
I keep hearing people cimplaining they installed FB4.7 and can't even start
it... with Ivy and other plugins
On Jun 17, 2014 8:25 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
wrote:
> Well lets take a look at file history. I'm using the googlesource views
> since github is blocked from work here.
> The SortField [1] and SortFieldCompareTypes [2] looks like they are safe.
> The GridColumn[3] has had a few modifications. Other than that it doesn't
> seem too bad.
>
> Just remember when monkey patching to use the same pathing and file name
> from your project. Also try not to use RLSLs (of the spark library) or you
> will have to do a frame 1 load.... one of those first in wins situations.
>
>
> /spark/collections/SortField.as
>
>
>
> [1]
> https://apache.googlesource.com/flex-sdk/+/develop/frameworks/projects/spark/src/spark/collections/SortField.as
> [2]
> https://apache.googlesource.com/flex-sdk/+/develop/frameworks/projects/spark/src/spark/collections/SortFieldCompareTypes.as
> [3]
> https://apache.googlesource.com/flex-sdk/+/develop/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
>
>
> -Mark
>
> -----Original Message-----
> From: Oleg Konovalov [mailto:olegkon@gmail.com]
> Sent: Tuesday, June 17, 2014 7:37 AM
> To: users@flex.apache.org
> Subject: Re: Changing sort type
>
> I wish I could do that!
>
> My company is very standards oriented and has just recently allowed to
> FB4.7 on Windows7,
> and from feedback I can see, lots and lots of developers are complaining
> about upgrade (mostly Eclipse4.x/FB problems - 64 bits, Flash, instability,
> can't launch,...).
>
> Since my team has several complex Flex projects (100K+ lines each) with
> many dependencies,
> it will take months to upgrade (if my boss reluctantly agrees),
> so in any case it's a long process...
>
> The bottom line is: it there another solution like sortCompareFunction
> implementation
> or anything else ? I need to fix it this week, not after Labor day ;-)
>
>
> On Tue, Jun 17, 2014 at 5:46 AM, Kessler CTR Mark J <
> mark.kessler.ctr@usmc.mil> wrote:
>
> > You should probably upgrade. Those files had quite a few changes since
> > 4.6. Monkey patching might be a pita.
> >
> >
> > Come to the dark side... we have cookies. :P
> >
> >
> > -Mark
> >
> > -----Original Message-----
> > From: Oleg Konovalov [mailto:olegkon@gmail.com]
> > Sent: Monday, June 16, 2014 5:09 PM
> > To: users@flex.apache.org
> > Subject: RE: Changing sort type
> >
> > Oh, it came in Flex 4.11? I see.
> > Hmm, I am still in 4.5.1 world.
> > What should I do? :-)
> > On Jun 16, 2014 5:05 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
> >
> > > Mark,
> > >
> > > I don't see Spark GridColumn having property sortCompareType.
> > > But it does have sortCompareFunction. Is that a method I need to
> > implement?
> > > How?
> > >
> > > Please advise.
> > >
> > > TIA,
> > > Oleg
> > > On Jun 11, 2014 7:06 AM, "Kessler CTR Mark J" <
> mark.kessler.ctr@usmc.mil
> > >
> > > wrote:
> > >
> > >> Well on each column there are a few properties to help sorting. I
> would
> > >> recommend looking into the sortCompareType[1][2]. It allows you to
> > force
> > >> which type of sorting is used for a column.
> > >>
> > >> e.g.
> > >> column.sortCompareType = SortFieldCompareTypes.NUMERIC;
> > >>
> > >>
> > >> [1]
> > >>
> >
> https://flex.apache.org/asdoc/spark/components/gridClasses/GridColumn.html#sortCompareType
> > >> [2]
> > >>
> >
> https://flex.apache.org/asdoc/spark/collections/SortFieldCompareTypes.html
> > >>
> > >> -Mark
> > >>
> > >>
> > >> -----Original Message-----
> > >> From: Oleg Konovalov [mailto:olegkon@gmail.com]
> > >> Sent: Tuesday, June 10, 2014 9:37 AM
> > >> To: users@flex.apache.org
> > >> Subject: Changing sort type
> > >>
> > >> Hi,
> > >>
> > >> We have a Flex4 DataGrid, which is totally dynamic, so I don't know in
> > >> advance number of columns or their types.
> > >> It is sorted on the first column, which we know is numeric:
> 1,2,3,4,...
> > >>
> > >> But users might want to sort
> > >> on other columns, happens often,
> > >> and some numeric columns contain negative numbers.
> > >> So how can I set sort type dynamically, when I find out column data
> > type,
> > >> after user click to sort it.
> > >>
> > >> TIA,
> > >> Oleg.
> > >>
> > >
> >
>
>
>
> --
> Thank you,
> Oleg.
>
RE: Changing sort type
Posted by Kessler CTR Mark J <ma...@usmc.mil>.
Well lets take a look at file history. I'm using the googlesource views since github is blocked from work here.
The SortField [1] and SortFieldCompareTypes [2] looks like they are safe. The GridColumn[3] has had a few modifications. Other than that it doesn't seem too bad.
Just remember when monkey patching to use the same pathing and file name from your project. Also try not to use RLSLs (of the spark library) or you will have to do a frame 1 load.... one of those first in wins situations.
/spark/collections/SortField.as
[1] https://apache.googlesource.com/flex-sdk/+/develop/frameworks/projects/spark/src/spark/collections/SortField.as
[2] https://apache.googlesource.com/flex-sdk/+/develop/frameworks/projects/spark/src/spark/collections/SortFieldCompareTypes.as
[3] https://apache.googlesource.com/flex-sdk/+/develop/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
-Mark
-----Original Message-----
From: Oleg Konovalov [mailto:olegkon@gmail.com]
Sent: Tuesday, June 17, 2014 7:37 AM
To: users@flex.apache.org
Subject: Re: Changing sort type
I wish I could do that!
My company is very standards oriented and has just recently allowed to
FB4.7 on Windows7,
and from feedback I can see, lots and lots of developers are complaining
about upgrade (mostly Eclipse4.x/FB problems - 64 bits, Flash, instability,
can't launch,...).
Since my team has several complex Flex projects (100K+ lines each) with
many dependencies,
it will take months to upgrade (if my boss reluctantly agrees),
so in any case it's a long process...
The bottom line is: it there another solution like sortCompareFunction
implementation
or anything else ? I need to fix it this week, not after Labor day ;-)
On Tue, Jun 17, 2014 at 5:46 AM, Kessler CTR Mark J <
mark.kessler.ctr@usmc.mil> wrote:
> You should probably upgrade. Those files had quite a few changes since
> 4.6. Monkey patching might be a pita.
>
>
> Come to the dark side... we have cookies. :P
>
>
> -Mark
>
> -----Original Message-----
> From: Oleg Konovalov [mailto:olegkon@gmail.com]
> Sent: Monday, June 16, 2014 5:09 PM
> To: users@flex.apache.org
> Subject: RE: Changing sort type
>
> Oh, it came in Flex 4.11? I see.
> Hmm, I am still in 4.5.1 world.
> What should I do? :-)
> On Jun 16, 2014 5:05 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
>
> > Mark,
> >
> > I don't see Spark GridColumn having property sortCompareType.
> > But it does have sortCompareFunction. Is that a method I need to
> implement?
> > How?
> >
> > Please advise.
> >
> > TIA,
> > Oleg
> > On Jun 11, 2014 7:06 AM, "Kessler CTR Mark J" <mark.kessler.ctr@usmc.mil
> >
> > wrote:
> >
> >> Well on each column there are a few properties to help sorting. I would
> >> recommend looking into the sortCompareType[1][2]. It allows you to
> force
> >> which type of sorting is used for a column.
> >>
> >> e.g.
> >> column.sortCompareType = SortFieldCompareTypes.NUMERIC;
> >>
> >>
> >> [1]
> >>
> https://flex.apache.org/asdoc/spark/components/gridClasses/GridColumn.html#sortCompareType
> >> [2]
> >>
> https://flex.apache.org/asdoc/spark/collections/SortFieldCompareTypes.html
> >>
> >> -Mark
> >>
> >>
> >> -----Original Message-----
> >> From: Oleg Konovalov [mailto:olegkon@gmail.com]
> >> Sent: Tuesday, June 10, 2014 9:37 AM
> >> To: users@flex.apache.org
> >> Subject: Changing sort type
> >>
> >> Hi,
> >>
> >> We have a Flex4 DataGrid, which is totally dynamic, so I don't know in
> >> advance number of columns or their types.
> >> It is sorted on the first column, which we know is numeric: 1,2,3,4,...
> >>
> >> But users might want to sort
> >> on other columns, happens often,
> >> and some numeric columns contain negative numbers.
> >> So how can I set sort type dynamically, when I find out column data
> type,
> >> after user click to sort it.
> >>
> >> TIA,
> >> Oleg.
> >>
> >
>
--
Thank you,
Oleg.
Re: Changing sort type
Posted by Tom Chiverton <tc...@extravision.com>.
On 17/06/14 12:36, Oleg Konovalov wrote:
> or anything else ? I need to fix it this week, not after Labor day;-)
You can try bringing in just the new class, and all it's dependencies,
into your own source. Flex will prefer the code in your project to that
in the library, so you can use this to 'monkey patch' in new features.
You may well find out that there are a lot of dependencies....
Tom
Re: Changing sort type
Posted by Oleg Konovalov <ol...@gmail.com>.
I wish I could do that!
My company is very standards oriented and has just recently allowed to
FB4.7 on Windows7,
and from feedback I can see, lots and lots of developers are complaining
about upgrade (mostly Eclipse4.x/FB problems - 64 bits, Flash, instability,
can't launch,...).
Since my team has several complex Flex projects (100K+ lines each) with
many dependencies,
it will take months to upgrade (if my boss reluctantly agrees),
so in any case it's a long process...
The bottom line is: it there another solution like sortCompareFunction
implementation
or anything else ? I need to fix it this week, not after Labor day ;-)
On Tue, Jun 17, 2014 at 5:46 AM, Kessler CTR Mark J <
mark.kessler.ctr@usmc.mil> wrote:
> You should probably upgrade. Those files had quite a few changes since
> 4.6. Monkey patching might be a pita.
>
>
> Come to the dark side... we have cookies. :P
>
>
> -Mark
>
> -----Original Message-----
> From: Oleg Konovalov [mailto:olegkon@gmail.com]
> Sent: Monday, June 16, 2014 5:09 PM
> To: users@flex.apache.org
> Subject: RE: Changing sort type
>
> Oh, it came in Flex 4.11? I see.
> Hmm, I am still in 4.5.1 world.
> What should I do? :-)
> On Jun 16, 2014 5:05 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
>
> > Mark,
> >
> > I don't see Spark GridColumn having property sortCompareType.
> > But it does have sortCompareFunction. Is that a method I need to
> implement?
> > How?
> >
> > Please advise.
> >
> > TIA,
> > Oleg
> > On Jun 11, 2014 7:06 AM, "Kessler CTR Mark J" <mark.kessler.ctr@usmc.mil
> >
> > wrote:
> >
> >> Well on each column there are a few properties to help sorting. I would
> >> recommend looking into the sortCompareType[1][2]. It allows you to
> force
> >> which type of sorting is used for a column.
> >>
> >> e.g.
> >> column.sortCompareType = SortFieldCompareTypes.NUMERIC;
> >>
> >>
> >> [1]
> >>
> https://flex.apache.org/asdoc/spark/components/gridClasses/GridColumn.html#sortCompareType
> >> [2]
> >>
> https://flex.apache.org/asdoc/spark/collections/SortFieldCompareTypes.html
> >>
> >> -Mark
> >>
> >>
> >> -----Original Message-----
> >> From: Oleg Konovalov [mailto:olegkon@gmail.com]
> >> Sent: Tuesday, June 10, 2014 9:37 AM
> >> To: users@flex.apache.org
> >> Subject: Changing sort type
> >>
> >> Hi,
> >>
> >> We have a Flex4 DataGrid, which is totally dynamic, so I don't know in
> >> advance number of columns or their types.
> >> It is sorted on the first column, which we know is numeric: 1,2,3,4,...
> >>
> >> But users might want to sort
> >> on other columns, happens often,
> >> and some numeric columns contain negative numbers.
> >> So how can I set sort type dynamically, when I find out column data
> type,
> >> after user click to sort it.
> >>
> >> TIA,
> >> Oleg.
> >>
> >
>
--
Thank you,
Oleg.
RE: Changing sort type
Posted by Kessler CTR Mark J <ma...@usmc.mil>.
You should probably upgrade. Those files had quite a few changes since 4.6. Monkey patching might be a pita.
Come to the dark side... we have cookies. :P
-Mark
-----Original Message-----
From: Oleg Konovalov [mailto:olegkon@gmail.com]
Sent: Monday, June 16, 2014 5:09 PM
To: users@flex.apache.org
Subject: RE: Changing sort type
Oh, it came in Flex 4.11? I see.
Hmm, I am still in 4.5.1 world.
What should I do? :-)
On Jun 16, 2014 5:05 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
> Mark,
>
> I don't see Spark GridColumn having property sortCompareType.
> But it does have sortCompareFunction. Is that a method I need to implement?
> How?
>
> Please advise.
>
> TIA,
> Oleg
> On Jun 11, 2014 7:06 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
> wrote:
>
>> Well on each column there are a few properties to help sorting. I would
>> recommend looking into the sortCompareType[1][2]. It allows you to force
>> which type of sorting is used for a column.
>>
>> e.g.
>> column.sortCompareType = SortFieldCompareTypes.NUMERIC;
>>
>>
>> [1]
>> https://flex.apache.org/asdoc/spark/components/gridClasses/GridColumn.html#sortCompareType
>> [2]
>> https://flex.apache.org/asdoc/spark/collections/SortFieldCompareTypes.html
>>
>> -Mark
>>
>>
>> -----Original Message-----
>> From: Oleg Konovalov [mailto:olegkon@gmail.com]
>> Sent: Tuesday, June 10, 2014 9:37 AM
>> To: users@flex.apache.org
>> Subject: Changing sort type
>>
>> Hi,
>>
>> We have a Flex4 DataGrid, which is totally dynamic, so I don't know in
>> advance number of columns or their types.
>> It is sorted on the first column, which we know is numeric: 1,2,3,4,...
>>
>> But users might want to sort
>> on other columns, happens often,
>> and some numeric columns contain negative numbers.
>> So how can I set sort type dynamically, when I find out column data type,
>> after user click to sort it.
>>
>> TIA,
>> Oleg.
>>
>
RE: Changing sort type
Posted by Oleg Konovalov <ol...@gmail.com>.
Oh, it came in Flex 4.11? I see.
Hmm, I am still in 4.5.1 world.
What should I do? :-)
On Jun 16, 2014 5:05 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
> Mark,
>
> I don't see Spark GridColumn having property sortCompareType.
> But it does have sortCompareFunction. Is that a method I need to implement?
> How?
>
> Please advise.
>
> TIA,
> Oleg
> On Jun 11, 2014 7:06 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
> wrote:
>
>> Well on each column there are a few properties to help sorting. I would
>> recommend looking into the sortCompareType[1][2]. It allows you to force
>> which type of sorting is used for a column.
>>
>> e.g.
>> column.sortCompareType = SortFieldCompareTypes.NUMERIC;
>>
>>
>> [1]
>> https://flex.apache.org/asdoc/spark/components/gridClasses/GridColumn.html#sortCompareType
>> [2]
>> https://flex.apache.org/asdoc/spark/collections/SortFieldCompareTypes.html
>>
>> -Mark
>>
>>
>> -----Original Message-----
>> From: Oleg Konovalov [mailto:olegkon@gmail.com]
>> Sent: Tuesday, June 10, 2014 9:37 AM
>> To: users@flex.apache.org
>> Subject: Changing sort type
>>
>> Hi,
>>
>> We have a Flex4 DataGrid, which is totally dynamic, so I don't know in
>> advance number of columns or their types.
>> It is sorted on the first column, which we know is numeric: 1,2,3,4,...
>>
>> But users might want to sort
>> on other columns, happens often,
>> and some numeric columns contain negative numbers.
>> So how can I set sort type dynamically, when I find out column data type,
>> after user click to sort it.
>>
>> TIA,
>> Oleg.
>>
>
RE: Changing sort type
Posted by Oleg Konovalov <ol...@gmail.com>.
Mark,
I don't see Spark GridColumn having property sortCompareType.
But it does have sortCompareFunction. Is that a method I need to implement?
How?
Please advise.
TIA,
Oleg
On Jun 11, 2014 7:06 AM, "Kessler CTR Mark J" <ma...@usmc.mil>
wrote:
> Well on each column there are a few properties to help sorting. I would
> recommend looking into the sortCompareType[1][2]. It allows you to force
> which type of sorting is used for a column.
>
> e.g.
> column.sortCompareType = SortFieldCompareTypes.NUMERIC;
>
>
> [1]
> https://flex.apache.org/asdoc/spark/components/gridClasses/GridColumn.html#sortCompareType
> [2]
> https://flex.apache.org/asdoc/spark/collections/SortFieldCompareTypes.html
>
> -Mark
>
>
> -----Original Message-----
> From: Oleg Konovalov [mailto:olegkon@gmail.com]
> Sent: Tuesday, June 10, 2014 9:37 AM
> To: users@flex.apache.org
> Subject: Changing sort type
>
> Hi,
>
> We have a Flex4 DataGrid, which is totally dynamic, so I don't know in
> advance number of columns or their types.
> It is sorted on the first column, which we know is numeric: 1,2,3,4,...
>
> But users might want to sort
> on other columns, happens often,
> and some numeric columns contain negative numbers.
> So how can I set sort type dynamically, when I find out column data type,
> after user click to sort it.
>
> TIA,
> Oleg.
>
RE: Changing sort type
Posted by Kessler CTR Mark J <ma...@usmc.mil>.
Well on each column there are a few properties to help sorting. I would recommend looking into the sortCompareType[1][2]. It allows you to force which type of sorting is used for a column.
e.g.
column.sortCompareType = SortFieldCompareTypes.NUMERIC;
[1] https://flex.apache.org/asdoc/spark/components/gridClasses/GridColumn.html#sortCompareType
[2] https://flex.apache.org/asdoc/spark/collections/SortFieldCompareTypes.html
-Mark
-----Original Message-----
From: Oleg Konovalov [mailto:olegkon@gmail.com]
Sent: Tuesday, June 10, 2014 9:37 AM
To: users@flex.apache.org
Subject: Changing sort type
Hi,
We have a Flex4 DataGrid, which is totally dynamic, so I don't know in
advance number of columns or their types.
It is sorted on the first column, which we know is numeric: 1,2,3,4,...
But users might want to sort
on other columns, happens often,
and some numeric columns contain negative numbers.
So how can I set sort type dynamically, when I find out column data type,
after user click to sort it.
TIA,
Oleg.