• 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
Problem: Tabbing makes focus leave NSCell for parent?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem: Tabbing makes focus leave NSCell for parent?


  • Subject: Problem: Tabbing makes focus leave NSCell for parent?
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Sat, 19 Aug 2006 13:11:12 +0100

Hi people,

I have a small problem with my cocoa app. The tabs aren't working properly! What's happening, is that in my NSTableView subclass, sometimes pressing tab will take you to the next cell, but othertimes it won't and just takes the focus to the it's parent, which is an NSTableView.

Why is this happening? I assume I haven't set something up properly, but I'm not sure what exactly.

Just for reference, I am implementing this:

- (BOOL)tableView:(NSTableView*)tv shouldEditTableColumn: (NSTableColumn*)tableColumn row:(int)row;

And I believe I'm implementing it correctly. I've stepped through the debugger on this one in fact. I'm being called with a column and row that contains a valid cell that can be edited. I return true. But then for some odd reason, tabbing does not step into that cell, despite that I returned true!!

Odd??

Also, there is a strange pattern to this, that I can partly detect.

My tableview has some columns which all have editable cells, but one column has only some rows are editable. So there are gaps in this column, that the user must not be able to edit and does not contain any value.

The tabbing always works properly if I am tabbing straight downwards, that is, my "gappable column", has a gap at that row.

But if I tab right into the "gappable column", and this column actually is editable, then... sometimes it works and othertimes it just goes to the parent. Strange pattern I know, because it's still only "sometimes", but I haven't been able to pin it down further.

In that problem cell that isn't getting the focus, I'm only overriding these:

- (void)drawWithFrame:(NSRect)Rect2 inView:(NSTableView *)controlView {
- (NSRect)drawingRectForBounds:(NSRect)Rect1 {
- (NSColor*)backgroundColor {
- (int)numberOfVisibleItems {

nothing special.

My table is overriding these:

- (float)rowHeight {
- (void)viewDidEndLiveResize {
- (void)highlightSelectionInClipRect:(NSRect)clipRect {
- (id)_highlightColorForCell: (NSCell*)cell {
-(void) reloadData {
-(void)mouseDown:(NSEvent*)event {


Once again, nothing to do with tabbing.

Now what? It looks really unprofessional having this quirky tabbing that sometimes works and sometimes doesn't, but I can't figure it out.

Any help would be greatly appreciated.

--
http://elfdata.com/plugin/



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Cocoa for Dummies book?
  • Next by Date: Re: cocoa with apache
  • Previous by thread: Re: Cocoa for Dummies book?
  • Next by thread: Show/Hide Toolbar Rendering Bug?
  • Index(es):
    • Date
    • Thread