• 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: Editable NSBrowser (Still Broken)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editable NSBrowser (Still Broken)


  • Subject: Re: Editable NSBrowser (Still Broken)
  • From: Evan Cooke <email@hidden>
  • Date: Wed, 19 Jun 2002 17:37:43 -0700

Quick summary so far: I am trying to create an Editable NSBrowser that allows navigation with a single click and editing with a double click. Per Brian's instructions in his reply I used editWithFrame: but the edit field does not appear when I double click it. I tried changing the color and appearance of the fieldEditor to see if it was the same color as the background but no good. Here is my code:

- (IBAction)browserDoubleClick:(id)sender
{
NSCell *selectedCell;
NSRect cellFrame;
NSMatrix *theMatrix;
int selectedRow, selectedColumn;
NSText *fieldEditor;

selectedCell = [myBrowser selectedCell];
selectedColumn = [myBrowser selectedColumn];
selectedRow = [myBrowser selectedRowInColumn:selectedColumn];
theMatrix = [myBrowser matrixInColumn:selectedColumn];

//that matrix only has one column so we pass it 0
cellFrame = [theMatrix cellFrameAtRow:selectedRow column:0];
fieldEditor = [[myBrowser window] fieldEditor:YES forObject:selectedCell];
[selectedCell editWithFrame:cellFrame
inView:theMatrix
editor:fieldEditor
delegate:self
event:nil];

NSLog(@"double click happened");
}

Any help getting editing working is very much appreciated.

Evan
_______________________________________________
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.

References: 
 >Re: Editable NSBrowser (From: Brian Webster <email@hidden>)

  • Prev by Date: Re: [Q] large flat files usage
  • Next by Date: Re: [Q] large flat files usage
  • Previous by thread: Re: Editable NSBrowser
  • Next by thread: Locating Library/Preferences folder...
  • Index(es):
    • Date
    • Thread