Gordon P. Hemsley

Linguist by day. Web developer by night.

Coding for Tab Awareness in Bespin

Posted by Gordon P. Hemsley on April 18, 2009

During our last status meeting, I brought up the issue of people not taking tabs (and the fact that they are variable-length characters) into consideration when coding new features that require text manipulation. As a result, I was asked to write a little tutorial on the wiki to help explain the situation to those not familiar with the code.

Take a look at the article. It starts by giving a little background information about the issue. It then makes note of which functions are expecting to be fed modelPos, rather than pos. It then goes on to explain how to obtain the proper position value and other things related to the fact that tabs are variable-length, based upon where they are in a line.

This article outlines the tools that one needs in order to properly consider tabs in text. However, it does not necessarily give step-by-step instructions on how to properly use the code; it has no examples. Is it clear enough to use? Or is there still confusion as to what to do?

Please leave me feedback here, and I’ll make any changes that are necessary to clarify things better. (Alternatively, you could make the edits yourself—it is a wiki, after all—but I wouldn’t necessarily recommend that. I mean, I am the one that wrote the original code…. You know, just saying.)

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: