• 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
Fwd: NSTableView rows and delete key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: NSTableView rows and delete key


  • Subject: Fwd: NSTableView rows and delete key
  • From: Raphaël Delcroix <email@hidden>
  • Date: Sun, 28 Jul 2002 13:30:00 +0200

Le vendredi 26 juillet 2002, ` 05:07 , Roarke Lynch a icrit :


On Friday, July 26, 2002, at 07:09 AM, Raphakl Delcroix wrote:

One last question : why don't I need to instantiate MyTableView in IB ?
Because it appears in the window (an NSTableView / custom class MyTableView) ?
In fact, instantiating or not in IB isn't a very clear topic for me yet.

You don't have to init MyTableView b/c when the NIB is loaded and the object is inited the call goes to it's superclass, NSTableView, unless you override it. In which call you should still call a [super init] within your subclasses init method. Then all is dandy.



I'm not sure we are talking about the same thing (?).
I'm trying to know when I do not need to use the 'instantiate' menu item of Interface builder about a class;
I'm not talking about the class implementation in Project Builder.
(Perhaps I don't understand the link between them ?)


Do I really need to subclass NSTableView to do so ? (for such a basic
feature ?)

Yes.
[...]

Euh... no !
I finally found a more simple way to do it :

in MyGeneralController.m (NSObject subclass), I create a category :

@implementation NSTableView (KeysEvents)

- (void) keyDown:(NSEvent *)event {
if ([[event characters] isEqualToString:@"\177"]) {

[[self delegate] removeRows:self]; // custom delegate
}
}

...

@end

R.D.
_______________________________________________
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: NSTableView rows and delete key
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: Re: Serial number verification / obfuscation (was: Re: Hiding
  • Next by Date: Re: Serial number verification / obfuscation (was: Re: Hiding
  • Previous by thread: Re: NSTableView rows and delete key
  • Next by thread: Re: NSTableView rows and delete key
  • Index(es):
    • Date
    • Thread