• 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: NSMatrix sending a message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMatrix sending a message


  • Subject: Re: NSMatrix sending a message
  • From: John Pannell <email@hidden>
  • Date: Fri, 28 Jan 2005 17:07:50 -0700

Hi John-

You will also need to specify the target for the action you have given the NSMatrix. As NSMatrix is a subclass of NSControl, you can utilize the setTarget: method. For example...

[aMatrix setTarget:_theController];
[aMatrix setAction:@selector(userClick:)];


Hope this helps!

John

On Jan 28, 2005, at 3:34 PM, John Spicer wrote:

Is there a way to set an NSMatrix to send a message when a person selects one of the items in it?

I found some sample code (the text was japanese, which didn't help much ;) and tried that but no luck. I've set a delegate of the matrix, and tried setAction to assign a method to be called but it's not getting called (debug text not printing).

Any ideas?

This is the source code, with things commented out that I've tried (some from the japanese sample, above)

- (void) PaletteController
{
// [theMatrix sendAction];
// [theMatrix sendAction:@selector(matbut:) to:self forAllCells:YES];
[theMatrix setAction:@selector(matbut:)];

}

-(id)sender
{
NSLog(@"matbut");
}
_______________________________________________
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
 _______________________________________________
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

References: 
 >NSMatrix sending a message (From: John Spicer <email@hidden>)

  • Prev by Date: Re: iTunes private framework
  • Next by Date: Mystery Thread
  • Previous by thread: NSMatrix sending a message
  • Next by thread: Re: NSMatrix sending a message
  • Index(es):
    • Date
    • Thread