Re: tables cells and views
Re: tables cells and views
- Subject: Re: tables cells and views
- From: Ondra Cada <email@hidden>
- Date: Sun, 28 Apr 2002 17:10:31 +0200
On Sunday, April 28, 2002, at 03:42 , nicolas berloquin wrote:
I have another question that will make my previous question a little bit
more clear...
Like I said I'm really new to cocoa, and I thought I could design a view,
then insert
it inside a table/matrix to have it repeated on the screen.
But I just found out that NSCell and NSView are different class
hierarchies, and that
you can't pass a NSView decendant as a NSCell... ;-(
Actually it is *very* easy to make a cell which would contain and display
a view (see docs). Though, there generally is no reason to do so.
let's say I want to show a list of thumnails with a filename, and a
couple of buttons underneath each thumbnail,
could someone tell me if I really can't design one copy of this as a
custom view in a NIB file, then
set it as a cell basis inside a matrix ?
You can, quite easily, see above. I would guess though that such a GUI
would badly need some refactoring -- this sounds like a Web page, not like
a decent Cocoa app. I might be wrong in this of course, since I haven't
seen the whole thing. Though, I would very definitely recommend first
trying a number of other Cocoa apps to decide whether you won't see a
better approach there, like
- tab view;
- table containing images and buttons (and whatever else);
- one set of buttons, used for the active object;
- pop-up menu over objects;
- any combination of the above ones, or so...
Generally it is quite bad practice to have a number of buttons, each of
which performs the same operation (just on different object). There are
exceptions of course, and it is quite possible your app is one of them.
how should I do it ?
Do I have to handle a NSScrollView by hand and place my custom views at
regular intervals inside it ?
That is *very* simple in Cocoa too, if you wanted.
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.