Re: NSMatrix subclass not working
Re: NSMatrix subclass not working
- Subject: Re: NSMatrix subclass not working
- From: Ricky Sharp <email@hidden>
- Date: Mon, 4 Sep 2006 09:36:02 -0500
On Sep 4, 2006, at 8:43 AM, Hans van der Meer wrote:
First I created a subclass of NSMatrix and added it to
InterfaceBuilder's classes.
Then took from the palette an NSMatrix object into the interface,
changing it via Inspector>CustomClass to the subclass.
Now I have two problems, the first one the gravest:
1. Building the application in XCode I get an unreponsive
application; aWakeFromNib is called but thereafter....silence.
2. Wanting to set the matrix cells to a subclass of NSCell should
be done to drag such een object to the interface. However, IB
doesnot let me instantiate a member of that class. The inspector
for NSMatrix shows no provisions for a custom cell class either.
Can this be done.
Please post your code so that it will be easier to find the problems.
Having said that, the following may help you:
If your matrix will always contain the same type of cell, something
you can do is to add the following to your matrix subclass:
- (Class)cellClass
{
return [YourClass class];
}
I'm not sure what you are planning to put in your matrix, but if it's
a button cell, you can first add a single button to your nib and set
it's attributes as needed. Then drag out a matrix. Finally, set the
matrix to use your custom class.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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