This is from a long ago bug report:

On Tue, 2003-06-10 at 15:46, Christopher Culver wrote: 
> I have a single-column NSBrowser instance. I would like to 
> automatically size it to that its width is as long as the longest 
> string within its cells. How do I do that? (I want its height to 
> remain fixed, just the width to expand).
> 
> Incidentally, I tried calling [browserInstance sizeToFit]. This 
> caused my machine to go under heavy load and start swapping. I was 
> lucky I could restart the damn thing. I was able to trace this 
> exactly to this instruction. Is one not supposed to call sizeToFit 
> on an NSBrowser instance? If not, then why does the application 
> compile fine when this instruction is present?

>From my tests, calling this method doesn't seem to do anything on
MacOSX.


Index: Source/NSBrowser.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSBrowser.m,v
retrieving revision 1.100
diff -u -r1.100 NSBrowser.m
--- Source/NSBrowser.m	18 Aug 2003 03:28:58 -0000	1.100
+++ Source/NSBrowser.m	20 Aug 2003 03:52:01 -0000
@@ -1710,6 +1710,12 @@
     }
 }
 
+/* Override from NSControl. Don't do anything to change the size of the 
+   browser.  */
+- (void) sizeToFit
+{
+}
+
 /*
  * Setting the delegate
  */
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to