NSTableHeaderView and NSTableView problem...
NSTableHeaderView and NSTableView problem...
- Subject: NSTableHeaderView and NSTableView problem...
- From: Allan Dushan <email@hidden>
- Date: Fri, 9 Jan 2004 10:06:32 -0800
I am attempting to create a subclass of NSTableHeaderView so that I can
override
+ (NSMenu*)defaultMenu;
- (NSMenu *)menuForEvent:(NSEvent *)theEvent;
so that I can provide a different contextual menu based on the column
header the mouse is over.
In Interface Builder I am using an NSTableView, and then in my code I
am using awakeFromNib to replace the current NSTableHeaderView with my
subclass of NSTableHeaderView. When I do this the table header does not
appear, leaving me with white space above the table. The code I am
using is as follows:
MyTableHeaderView *customTableHeaderView = [[MyTableHeaderView alloc]
init];
[tableView setHeaderView:customTableHeaderView];
This seemed straight forward, but I must be missing other
initialization code that is required. Anyone know what else needs to be
done?
Thanks,
Allan Dushan
email@hidden
_______________________________________________
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.