To start with, and what is probably the biggest issue with your edit: The question looks too broad, a reason to close, and your edit doesn't even begin to fix that issue. It's never worth your time to edit a post that will likely be closed and deleted, unless your edit makes the post on topic.
Other, smaller points that don't help your edit:
- You removed the "Cheers" line, and left the "Thanks in advance." Both lines are noise and should be removed while you're cleaning up the rest of the post.
- The question is hard to read because it's a single paragraph with code written in plain text. Either breaking up the paragraph or inline code blocking the couple of methods(?) listed in the post. Both probably would've helped readability.
- I would argue that the two "view" tags you added don't help much with classification of the question, but I could also see arguments to the contrary. Depending on the reviewers' thoughts on the usefulness of those tags, that may help in their decision to reject.
- Looking at the question itself, it's an old question, and your edit would bump it needlessly without greatly improving the question. That could also have weighed in the reviewers' decision.
Your edit really didn't make the post much better, if any. The post is still off-topic, still hard to read, and still contains noise. The reject reason is certainly correct.