Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSTxtView linewrapping bug?

NSTxtView linewrapping bug?
Thread Tools
Forum Regular
Join Date: Jul 2002
Location: eimsbusch
Status: Offline
Reply With Quote
Mar 19, 2003, 08:41 AM
 
sorry if this has been brought up before, and excuse the messy layout that follows, but this is serious...

for the last couple of months i'm experiencing a weird and rather irritating bug in TextEdit.app and Mail.app and thought "good heavens, am i glad that our app does not exhibit this behaviour".

now, as of today, guess what?

this is the problem:
let's say i have the following line...

Code:
these are just some words |
where "|" marks the end of the line or rather the end of the NSTextView. if i continue writing, all is well:

Code:
these are just some words | while this is a dot: . |

k, now SOMETIMES it just happens that one misses a space, and the line wraps like this:

Code:
these are just some | wordswhile this is a dot: . |
all is well, correct behaviour. now, if one enters a space between "words" and "while", the lines should rewrap, but they just don't! instead, this is the result:

Code:
these are just some | words while this is a dot: . |
this does not happen all the time, and i have yet to discover a pattern, but the simple fact that it happens SOMEtimes makes me pretty nervous.

in TextEdit.app -- and this is VERY strange -- this wrapping bug sometimes happens upon the opening of a document (that's right: the documents get rewrapped), and switching magnifications resolves the problem as it once again seems to rewrap the whole document.

yet, in our app, we don't have magnifications, so one needs to actually rewrap the lines himself (rather awkward by deleting the leading space before "words" and then adding it again) or resize the NSTextView one way or the other to get proper linewrapping back.

is this a known bug, and if so: how can it be fixed?
and furthermore: why does this not happen all the time? i tried, but was unable to pin it down to ps- or tt-fonts, fixed-width, variable-width, certain sizes, wordbreaks on/off -- it doesn't matter...

on a sidenote: is it just me or does anybody else feel that the way the insertion point moves from one line's end to the beginning of the next line (when soft-wrapping is on) is less than perfect? if i click on the end of a line, the insertion point is placed behind the last space, and a tap on the left-arrow places it behind the first character of the next line. yet, placing the insertion-point before the last space, a tap on the left-arrow places the insertion point at the very beginning of the next line. however, shift-left-arrow selects the last space.
i can sense some logic behind that, but, to be honest, it really seems wrong to me. and i wonder if this "phenomenon" is the cause for the wrapping-bug...

thanx and greetz
All kinds of Utopian plans were flashing through his (B's) busy brain...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:55 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2