• 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: More learning questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More learning questions


  • Subject: Re: More learning questions
  • From: John Tsombakos <email@hidden>
  • Date: Sat, 4 Aug 2001 15:29:50 -0400

Ok. This is what I have now. The array is still defined in the data source. I added a method:

- (NSMutableArray*)getMyArray;

In my table view subclass, I'm overriding the - (BOOL)performKeyEquivalent:(NSEvent *)theEvent method and in there I do:

NSMutableArray *a;

a = [[self dataSource] getMyArray];

And I can get the elements of my array! I hope this is the right way, or at least close the the proper way to do this.

Thanks again,

jt

On Saturday, August 4, 2001, at 02:55 PM, Ondra Cada wrote:

John,

John Tsombakos (JT) wrote at Sat, 4 Aug 2001 14:17:44 -0400:
JT> So if I want to get the key down events from the table view, would I use
JT> a subclass or a delegate?

Probably a subclass, but see the docs, I am not sure which all events are
sent to delegate from nstableview.

Generally, though, the views interpret keys themselves, and consult with the
delegate the results (like NSTableView by itself reads the down arrow, and
asks the delegate whether to change the selected row). In my experience, it's
almost always sufficient.

Why do you want to get the keydowns?
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Prev by Date: Re: Contextual Menu with PopUpButton
  • Next by Date: Re: Programatically Designing a GUI
  • Previous by thread: Re: More learning questions
  • Next by thread: Thanks all
  • Index(es):
    • Date
    • Thread