How long were the two of you together?
How old are the two of you?
Why did the two of you break up?
What did you fight over?
What were some of the issues?
Basically you can't make a man commit to you if he doesn't want to. If he thinks that he can come in and out of your life and get what he wants and still be "friends" then of course he will do that, if you let him. The key is to stay busy, act like you don't need to be around him all the time, if he calls you, don't always answer, or be the first to get off the phone, telling him that you 'have something to do'. If he really cares about you then eventually he will start to wonder what's going on with you and why you are not showing the same interest you once showed and he will become the one who is chasing. Remember that you teach people how to treat you, no on can treat you badly without your permission and that's a fact.
I welcome your thoughts, let me know if you want to talk more.