• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Editable NSTextField and layout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editable NSTextField and layout


  • Subject: Re: Editable NSTextField and layout
  • From: John Stiles <email@hidden>
  • Date: Fri, 04 Jan 2008 18:13:58 -0800

Okay, F-Script Anywhere to the rescue. Apparently this sequence of events causes the "scrollable" property of the NSTextFieldCell to become NO (it starts as YES if you create it in IB). Everything else was the same. I guess I'll file a radar since there's no reason that this should happen.

Interestingly, a programmatically created NSTextField's cell also seems to have its scrollable property set to NO by default (and its line-break mode is "break by word-wrapping" instead of IB's "break by clipping"). I guess this is normal since these settings probably make the most sense for a non-editable text field.


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.

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:]).

_______________________________________________

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


References: 
 >Editable NSTextField and layout (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Circular initialization of controllers in NIB file
  • Next by Date: Re: Editable NSTextField and layout
  • Previous by thread: Editable NSTextField and layout
  • Next by thread: Re: Editable NSTextField and layout
  • Index(es):
    • Date
    • Thread