• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableHeaderView and NSTableView problem...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSTableHeaderView and NSTableView problem...
      • From: Allan Dushan <email@hidden>
References: 
 >NSTableHeaderView and NSTableView problem... (From: Allan Dushan <email@hidden>)

  • Prev by Date: Re: NSWindowController problem
  • Next by Date: Re: Collection classes
  • Previous by thread: NSTableHeaderView and NSTableView problem...
  • Next by thread: Re: NSTableHeaderView and NSTableView problem...
  • Index(es):
    • Date
    • Thread