Re: Editable NSTextField and layout
Re: Editable NSTextField and layout
- Subject: Re: Editable NSTextField and layout
- From: John Stiles <email@hidden>
- Date: Fri, 04 Jan 2008 18:20:53 -0800
Heh, I came to the same conclusion and filed a radar as well. Good to
see that I'm not the only one!
Steve Nygard wrote:
On 4-Jan-2008, at 18:43 , John Stiles wrote:
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.
There are two separate NSCell flags, isScrollable and wraps. When you
set one to YES, the other is changed to NO. I'm guessing IB is only
setting the wraps flag from the popup, so both flags end up as NO.
(IB on Tiger just sets the other flag, so you can't make the cell
wrap.) It should set the appropriate flag to YES to make it work.
I've only tested in Leopard but I'm thinking about verifying in Tiger
and then filing a Radar.
I filed a bug report about this yesterday.
--
Steve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden