[Top][All Lists]

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

NSPopUpButton is disabled under Linux

From: Christian Husmann
Subject: NSPopUpButton is disabled under Linux
Date: Tue, 2 Sep 2003 16:35:07 +0200


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;


reply via email to

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