Re: Another Flex/VMS example - Browsing the ACCOUNTNG.DAT file



Richard Maher wrote:
Hi JF,

You have to specify Array.NUMERIC when you call the sortOn Array method.
for example: myarray.sortOn('item', Array.NUMERIC);

I think the problem Peter's experiencing is on the default Flex datagrid
column sort. (ie. Just clicking on the column header). I don't use the
gratuitous waste of bandwith that is XML myself and am not sure how one
would distinguish a numeric from a string (although if you look at the Adobe
Dashboard example for a while it can't be too hard to figure out as it (with
XML) certainly works there.)

[snip]

The array is the one specified as the dataProvider of the datagrid. Just specified the flag and Flex do the job for you when you click on the column title.

if you specified the sortOn method using Array.NUMERIC the array will be sorted (for this column) using a numeric sort instead of a string sort.

My example use the AMF protocol which is native in Flex (according to the PyAMF site using AMF allow applications to load data up to 10 times faster than with text-based formats such as XML or SOAP.)

JF
ps.
As promise a long time ago, I have set up a repository will full source of my example. I have,initially, planed to rewrite it using PureMVC but due to lack of time it's delayed, so I have decide to publish the code asis. I also expect to publish another example because 3 students are working on a T4 data browser using Flex.
Send me email with a valid email and I will give you access (read only or read/write if you want to collaborate) to the repository.


.



Relevant Pages

  • Re: sorting a dataset
    ... Ideally, I would like to return the data in structured hierarchical xml, eg: ... I know I can copy my dataset into a dataview and sort the ... >> are sorting a dataview. ...
    (microsoft.public.dotnet.xml)
  • Re: sorting a dataset
    ... Ideally, I would like to return the data in structured hierarchical xml, eg: ... I know I can copy my dataset into a dataview and sort the ... >> are sorting a dataview. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Upload XML file to website cart, Security Issues?
    ... If you allow the XML to contain DTD's all sorts ... So when you are parsing your XML file make sure ... DTD Attacks: Entity expansion attacks, Cross domain access, content model ... any sort of Injection or Scripting attack. ...
    (microsoft.public.dotnet.xml)
  • Re: Directory Scanning
    ... Not a good idea in XML though. ... sort of file" is an artefact of some _implementations_ of file systems. ... "Borrowing" HTML elements is bad software design too because it's ... confusing the fact that these are entirely separate elements because ...
    (comp.text.xml)
  • Re: Tokenizing data based on an EBNF grammar?
    ... benefit from being run through a Lexer/Parser and outputed XML. ... sure if I need a parser generator or a scanner generator ... significant parsing. ... You could try flex, or writing it manually. ...
    (comp.programming)