Can't anyone help me with PopUp Menus?
Can't anyone help me with PopUp Menus?
- Subject: Can't anyone help me with PopUp Menus?
- From: email@hidden
- Date: Wed, 4 Feb 2004 01:32:41 EST
Can someone please provide me with working code.
I realize everyone has a solution and offers me one line of code but after
more than a week not one offer recieved has been a working one.
I'd settle for one line of code that would place "This Works" (or any other
text) in an empty pop-up menu as long as it works.
My requirements are simple, it's a Cocoa app, it has a single window with an
empty pop-up menu, when you run the app it puts text in the pop-up menu, can
put more than one item if you prefer, I just need to see it work.
I'd settle for one line of code that would place "This Works" (or any other
text) in the empty pop-up menu as long as it works.
here is what I already have in code.
_______________________________________________
menu.h
_______________________________________________
#import <Cocoa/Cocoa.h>
#import <AppKit/AppKit.h>
@interface menu : NSObject
{
IBOutlet NSPopUpButton *objectPop;
CFStringRef appID;
}
- (id)init;
- (void) Pop_Menu;
@end
_______________________________________________
menu.m
_______________________________________________
#import "menu.h"
@implementation menu
-(id)init
{
extern id NSApp;
[NSApp setDelegate: self];
[ self Pop_Menu ];
return [super init];
}
- (void) Pop_Menu
{
/* put text in menu */
[objectPop addItemWithTitle:@"Test"];// this didn't work
}
@end
_______________________________________________
Someone has to know how to do this, please help someone out who can't figure
it out.
_______________________________________________
Best regards,
Mr. Dale Walsh
_______________________________________________
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.