Re: NSView as dataCell in TableView WORKED
Re: NSView as dataCell in TableView WORKED
- Subject: Re: NSView as dataCell in TableView WORKED
- From: Mike Abdullah <email@hidden>
- Date: Tue, 28 Mar 2006 09:13:15 +0100
Maybe have a look at NSNib to cache the nib for you.
However, this is the reason why tableviews do not use views easily,
they need a lot more overhead than an NSCell subclass.
Mike.
On 28 Mar 2006, at 07:54, Lorenzo wrote:
Yes, it's a little bit tricky. For example I load a small list,
e.g. 30 records in a while from memory.
But I have to load 30 times the nib file each time I load a list of
records, and it gets some second to show the list.
It's not a good performance. Do you know any way to load the nib
file once only and get duplicates of the control object?
Best Regards
--
Lorenzo
email: email@hidden
From: Mike Abdullah <email@hidden>
Date: Mon, 27 Mar 2006 23:45:32 +0100
To: Lorenzo <email@hidden>
Subject: Re: NSView as dataCell in TableView WORKED
Glad you got it going. NSTableView really isn't meant for this,
and as I go along, I've found a few oddities that have to be
solved by some fairly hefty subclassing. In particular, sorting
out the nextKeyView chain was a bit of a pain.
Good luck,
Mike.
On 27 Mar 2006, at 22:34, Lorenzo wrote:
Thank you for your support. Now everything is running very fine.
Best Regards
--
Lorenzo
email: email@hidden
From: Mike Abdullah <email@hidden>
Date: Sun, 26 Mar 2006 19:32:14 +0100
To: Lorenzo <email@hidden>
Subject: Re: NSView as dataCell in TableView WORKED
OK, glad you got things going in the end. I was considering
fixing up my demo project a little instead!
I'm afraid though, now is when things may start to get a little
messy. The problem is that tables really aren't designed to
cope with having other views inside them. You have to make a
few modifications.
Basically, have a good long, hard think about what is happening
inside the whole NSView structure and try and figure out what's
going on. I'm sure I has a similar problem myself, but can't
remember exactly how I solved it. If you send me a copy of your
app, I can probably figure it out though.
Mike.
P.S. Out of interest, if you click on a part of your view-cell
that has no control in it does your app crash? I had this
problem with mine, and in the end I had to subclass the view-
cell to stop it passing mouseDown events up the responder chain.
On 26 Mar 2006, at 19:11, Lorenzo wrote:
Forget my last email.
I did it. It worked. COOL! Thank you.
Only a small problem: when I change the value of a textField
in the rowView (e.g. moving a slider),
the other textField string (in the same row) gets darker and
darker. How to avoid this problem?
When I click on a different row, the text fields refresh
properly.
Thanks again.
Best Regards
--
Lorenzo
email: 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