I asked this question on SO and someone (@sumit choudhary) put a comment that really helped me, it explained why my code wasn't working. Because nobody posted an answer, I answered my own question while giving credit to @sumit choudhary. Now, @sumit choudhary posted this comment You should put this as comment instead of answer.
. I'm not sure if this is the right way. I really like SO questions that have answers and I really dislike questions that have no answers. What should I do here? Delete my answer and put it in a comment? Or just accept my own answer and ignore his comment?
Thank you all for the answers/comments. I accepted my own answer and instead of flagging @sumit choudhary's comment, I posted the link to this meta question as a comment. This link will give him more information than just flagging his comment (then he just thinks I ignored him). Next time I will ask the comment placer to post an answer.
Update: his comment is now deleted and also my link to this meta question.