NSTextFieldCell not honoring -setScrollable:?
NSTextFieldCell not honoring -setScrollable:?
- Subject: NSTextFieldCell not honoring -setScrollable:?
- From: Anthony Duer <email@hidden>
- Date: Thu, 22 Jul 2004 23:08:43 -0700
Hey list,
In the program I'm currently writing, I'm trying to swap a NSTextField
between scrolling and wrapping its text. I'm doing this via calling
-setScrollable: on NSTextField's -cell. When the toggle is on, I'm
calling [[commandLine cell] setScrollable: YES] and NO when the toggle
is off. The cell's -isScrollable NSLog's correctly so I know it's
changing. However, when the program is run, the NSTextField continues
to scroll rather than wrap the text like the documentation says it
should.
Code:
if([[values objectForKey: @"Commandline Resize"] intValue] ==
NSOnState)
{
[[commandLine cell] setScrollable: NO]; //NSLog's as 0 when
calling -isScrollable
[commandLineWindow setWrapCommandline: YES]; //Merely sets the
window to be resizable
}
else
{
[[commandLine cell] setScrollable: YES]; //NSLog's as 1 when
calling -isScrollable
[commandLineWindow setWrapCommandline: NO]; //Sets the window
to maintain size.
}
Am I just reading the documentation wrong or should this text field be
wrapping its text and there's just something odd going on? The archives
seem to support me in that other people have posted that they've gotten
it to work.
~Anthony Duer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.