Skip navigation.
 
mlEditable NSTextField and layout
FROM : John Stiles
DATE : Sat Jan 05 02:43:16 2008

I've found what appears to be a bug in NSTextField but I'm not sure how
exactly to classify it or work around it.
You can reproduce it entirely via Interface Builder (though I originally
found it in code).
Steps:
- Open IB3 and create a Cocoa window
- Drag in an editable NSTextField
- In the Inspector, view its Attributes
- Change Layout from "Scrolls" to "Wraps," and then back to "Scrolls"
- Test drive the interface and try typing in more text than the edit
field can contain

You'll find that once the edit field fills up, the insertion point pins
itself to the right edge of the edit field but the text never scrolls.
It appears that your input is being discarded, but it's actually being
invisibly accepted; the only way to see it is to copy-and-paste it out
or to delete the beginning of the string so that the characters scroll
back into view.

What's going on here? This can't be right.

I've only tested in Leopard but I'm thinking about verifying in Tiger
and then filing a Radar.

For the curious, I got similar behavior in my code by calling
[[myTextField cell] setWraps:NO] (on a text field created
programmatically, via [[NSTextField alloc] initWithFrame:]).

Related mailsAuthorDate
mlEditable NSTextField and layout John Stiles Jan 5, 02:43
mlRe: Editable NSTextField and layout John Stiles Jan 5, 03:13
mlRe: Editable NSTextField and layout Steve Nygard Jan 5, 03:14
mlRe: Editable NSTextField and layout John Stiles Jan 5, 03:20
mlRe: Editable NSTextField and layout Ricky Sharp Jan 5, 03:48