Re: When is editWithFrame:... used?
Kyle Sluder <[email protected]> Wed, 7 Dec 2011 18:41:18 -0800
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <CANEs-cxBqEM_oqoeRB=e3BZjN-E9a7CHqLun86hOBUMj5zRPeg@mail.gmail.com> |
On Wed, Dec 7, 2011 at 4:20 PM, Christiaan Hofman <[email protected]> wrot= e: > And there's a difference between "show in use" and "subclass it". The sam= ple code only does the latter, that does not mean that it is in use, and it= is never called anywhere in the sample code. The sample code also does not= say what one should do to have it called, so it most definitely does not q= ualify as "show in use". The NSTableView documentation for -editColumn:row:withEvent:select: contains an error; it should say "This method [=85] sends editWithFrame:inView:editor:delegate:event: or, if select is YES, selectWithFrame:inView:editor:delegate:start:length: to the field editor=92s NSCell object with the NSTableView as the text delegate." The only case I've found so far that calls -editWithFrame:=85 is NSMatrix. Stick a couple of NSTextFieldCells in an NSMatrix and click around, and you'll break on -[NSCell editWithFrame:=85]. You'll also probably break on -selectWithFrame:=85 at least once, so I don't know what logic NSMatrix is using. NSCell's implementation is actually the same for both -editWithFrame:=85 and -selectWithFrame:=85. NSTextFieldCell does not override either of these methods, so the behavior is the exact same. I don't know if having two methods is useful anymore, or indeed if it ever = was. --Kyle Sluder