Ravi
Ravi

Reputation: 35

Compare text files in Flex

Is there a utility or thirdparty library out there to compare two text files in flex. Assuming that, I have loaded two different text files using the 'FileReference', and now I want to compare the contents of these two. Similar to the SVN diff, I want to find out the edited/added/deleted content for each line.

I have gone through this thread [ Is there a way to compare text files through Flex? ] but it's not answered here.

Thanks,

Upvotes: 2

Views: 565

Answers (2)

Julio Rodrigues
Julio Rodrigues

Reputation: 3413

I think that there's no one, yet.

Given the similarities between as3 and js, a port from one of this two libraries should be straightfoward

http://code.google.com/p/google-diff-match-patch/source/browse/trunk/javascript/diff_match_patch_uncompressed.js

http://ejohn.org/projects/javascript-diff-algorithm/

Upvotes: 0

AndrewF
AndrewF

Reputation: 148

I'm pretty sure this link will guide you towards your solution. May have to do some tweaking to work with your feature list, but it should get you 90% of the way there.

A diff/patch solution for Flash: a proof of concept Monte Carlo algorithm for comparing text versions in as3

I just searched for 'as3 file differential' in Google.

Upvotes: 1

Related Questions