Re: NSTableHeaderView and NSTableView problem...
Re: NSTableHeaderView and NSTableView problem...
- Subject: Re: NSTableHeaderView and NSTableView problem...
- From: Jörn Salewski <email@hidden>
- Date: Sat, 10 Jan 2004 05:38:57 +0100
Hi,
Shouldn't you initialize your TableHeaderView subclass better with
- (id)initWithFrame:(NSRect)frameRect?
Something like:
MyTableHeaderView *customTableHeaderView;
NSRect headerFrame = [tableView frame];
customTableHeaderView = [[MyTableHeaderView alloc] initWithFrame:
headerFrame];
[tableView setHeaderView:customTableHeaderView];
Yours,
Joern Salewski
am 09.01.2004 19:06 Uhr schrieb Allan Dushan unter email@hidden:
>
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.
_______________________________________________
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.