Sunday, February 21, 2010

Uploaded Patch For Bug # 540112

Introduction
I was able to complete my bug over the course of the weekend after a few frustrations and getting reacquainted with a language that I had not used for a good two years. It was nice to revisit it and it feels good to get that patch done and uploaded. Details about the bug can be found on my wiki.

Specifications
For my bug, I had to make the text-cursor in the editor blink when the editing area had focus, like a cursor regularly does in a text-editor. The file that I had to edit was

bespinclient/plugins/supported/editor/views/text.js
.

There wasn't too much editing in regards to this patch, but I had to make a timer function which called the drawInsertionPoint function, which placed the cursor on the page, and I had to make it so it would blink...so I used a boolean that would change every time the function was called so it would either colour the cursor the same colour as the background or colour it the colour that the cursor is supposed to be (blue). I had a lot of help from Julian Viereck in finding the right file and about the file system of Bespin. When I was struggling with getting it to work, Harjinder helped me to debug it and we worked together to find what was wrong with it. He was a huge help.

What I learned

  • Learned how to iterate through large pieces of code
  • Learned that I should check to see if the bug is still current/test it to see if the issue is still occuring
  • Memorized how to update my files using Mercurial (hg pull -u). Previously, kept forgetting that syntax
  • Learned how important communication is in the open source community
  • When you work together you're bound to resolve the problem quicker because each person has a different approach to the problem, more things are noticed, and different solutions are brought to the table
Conclusion
The cursor now blinks in Bespin and my code is up for its first review. I hope it gets accepted but either way I am looking forward to the constructive criticism.

No comments:

Post a Comment