when do you use a hard space today? / Text Handling Features

Dave Calkins davecalk at intergate.com
Sat Aug 27 00:11:09 EDT 2005


On Aug 16, 2005, at 8:52 AM, use-revolution-request at lists.runrev.com 
wrote:

> Subject: Re: when do you use a hard space today?
> Reply-To: How to use Revolution <use-revolution at lists.runrev.com>
>
>
> At 4:29 PM -0700 8/15/2005, Erik Hansen wrote:
>> --- Ken Ray <kray at sonsothunder.com> wrote:
>>>  Hardly ever... the only times I've used it has
>>>  been in web pages to get
>>>  things to line up.
>>
>> so it is an HTML thing.
>
> Not just HTML; you can use a non-breaking space whenever you don't 
> want a line to break. For example, between a title (Dr., Mr., etc.) 
> and the name; or between the characters of an equation where you want 
> the equation all on one line for readability.


I know this thread is over a week old, but ... (on this list, that's a 
long time)

Another place where I use them is when I want to create an indented 
paragraph in a report. Normally extra Tabs and Spaces are filtered out 
from a line when they are the first character in a wrapped line, unless 
the first char of the wrapped line is a  hard space. This allows the 
tab(s)  to indent the paragraph so that things will line up. Not the 
best solution because they have to be filtered out if the text is 
edited. but I haven't found a better option.


I believe that there are a couple of text handling features that would 
greatly enhance Rev and many types of applications that we work with.  
I know it would make a big difference to me.


A.     An indent paragraph textStyle property.

An indent paragraph textStyle property would allow a paragraph, ie 
line,  or chunk of text to indent to a tab stop or margin as if
you were adjusting the leftmargin of only a portion of a field.


I could see this being done in one of a number of ways.

1. Allow the leftMargin / rightMargin be applied to chunks of text.

ie. set the leftMargin of line 3 of fld "WhichField" to 10
     set the rightMargin of line 4 to 5 of fld "WhichField" to 10
     set the leftRightMargin of line 6 of fld "WhichField" to 10,50

or


2. Creating a property that is applied to a chuck of text, similar to 
textStyle, Font, or color, but which indents the
text.
ie.  set the leftIndent of line 2 of fld "WhichField" to 10

really the same as above but with a different name.

or

3. Create a constant that is similar to the space constant, but a space 
would be interpreted as a tab (one for each constant) when it is
before each "wrapped" element of a line.



Presently this can sort of be done by jumping through all kinds of 
hoops in order to create the look of
an indented paragraph in a report, by putting a hard space & a tab 
before the first character in each
wrapped portion of a line. Normally extra Tabs and Spaces are filtered 
out from a line when they are the
first character in a wrapped line, so the hard space is required to 
allow the tab(s)  to indent the
paragraph.


This is not truly a solution because if the user edits the report by 
adding or subtracting text from the
document, all of the formating is screwed up. All of the hard space / 
tabs have to be filtered out of the
text and then the text has to be reinitialized. Not a good / 
professional solution from the standpoint of
the client.

Bugzilla # 3088
http://support.runrev.com/bugdatabase/show_bug.cgi?id=3088

B.    A textAlign property that would be able to be applied to chunks 
of text, just like font, size, color, and style (bold, italic, etc.) 
are, not just to an entire field.

A textAlign property that would be able to be applied to chunks of 
text, just like font, size, color,
and style (bold, italic, etc.) are, not just to an entire field.

ie. set the textAlign of line 1 of field "Results Notification" to 
center

This would make normal text report /  text document generation tons 
easlier. You would not have to
create a form, a group etc. in order to do something that is common and 
easly done in 90 percent of
the applications out there.


Bugzilla # 3087
http://support.runrev.com/bugdatabase/show_bug.cgi?id=3087


Several years ago, before bugzilla, this request was made and there 
were a bunch of people
supporting the request, but nothing ever came of it.

Please consider adding these few textStyle enhancement features.

Dave Calkins




More information about the use-livecode mailing list