[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopUpButton is disabled under Linux

From: Fred Kiefer
Subject: Re: NSPopUpButton is disabled under Linux
Date: Thu, 04 Sep 2003 20:09:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204

Christian Husmann wrote:
I have a problem with the NSPopupButton. I've build a gui with that NSPopUpButton and on the Mac it's working, but when I run the same application the popup is disabled.
What can i do?

I'm using this code for creating the popupbutton:
@implementation NSPopUpButton (NSPopUpButtonBundleExtension)

- (id)initWithElementDic:(NSDictionary *)dic
NSArray *array = [[dic objectForKey:@"rect"] componentsSeparatedByString:@","]; NSRect rect = ([array count] == 4 ? NSMakeRect([[array objectAtIndex:0] floatValue], [[array objectAtIndex:1] floatValue], [[array objectAtIndex:2] floatValue], [[array objectAtIndex:3] floatValue]) : NSZeroRect);
   if (rect.size.width > 0)
      self = [super initWithFrame:rect];
      if (!self) return nil;

      NSArray *items = [dic objectForKey:@"items"];
      [self insertItemWithTitle:[items objectAtIndex: 0] atIndex:0];
      [self insertItemWithTitle:[items objectAtIndex: 1] atIndex:1];
      [self setEnabled: YES];
      return self;
   return nil;


Your code looks fine to me. Which version of GNUstep are you using? I did do a bigger rewrite of NSPopUpButtonCell some weeks ago and right in the middle of it sometimes popups stayed disabled. So an update of your GNUstep sources might help.

If not I will perhaps find some time later to try your code.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]