Neil Bamber's profileFriendMap - Made in Expr...BlogLists Tools Help

Blog


    8/3/2006

    Circles.

    Last night I sat down and wrote the help file for my application. I wrote the topics in word and then used HTML Help to compile them into the CHM format. HTML Help was a little bit temperamental and didn’t compile a few times due to the paths of the html files. Everything seemed to be fine if you didn’t save and load the project again though so I just did it all at once. I couldn’t figure out how to create sections in the help file but since there aren’t too many pages I didn’t fuss over it. The file loads and displays nicely from within my application and even though HTML Help is a bit archaic I’m glad I went the CHM route.

     

    Writing the help file was (as everyone would expect) boring however it made me use my application and helped me discover a few more bugs, so in that regard it was a worth while process. Now I just need to work on fixing the newly discovered bugs before the project is due.

     

    One bug I did fix today was my line drawing problem when relationships were more than one person deep. I’d thought about this problem for a while but never reached a work able solution, I originally thought of storing the “parent” circle as a property but that idea was shot when I came to implement it due to the way I draw friends using recursion. So the parent would be updated anytime there were children, which would leave me with the same problem.

     

    So after looking at the code and thinking about how I could do it I came up with the idea of moving X number of circles backward, where X is the number of children a parent has. This was pretty easy to do, if the parent circle was on the same line as the child circle (X – (size * childCount)), but when the child circle was on the next line it got a little more complicated. I spent a lot longer (45 minutes) figuring the problem out and implementing it than I would have liked (15 minutes) seeing as the solution ended up being pretty simple. Calculate the number of pixels behind X we are, determine how many circles can fit in that amount of pixels (the number of circles on the new line we need to move back), then determine the new X position by maxCirclesPerLine – previousLineCircles * circleSize.

     

    I expect most of the remaining bugs and features to be fixed or added by tomorrow night and then I’ll spend Saturday figuring out how to distribute my program so people can actually use it.

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://madeinexpress9.spaces.live.com/blog/cns!FCF52866CE8B44E6!183.trak
    Weblogs that reference this entry
    • None