Re: [IB] Cells vs Controls in the Library
Re: [IB] Cells vs Controls in the Library
- Subject: Re: [IB] Cells vs Controls in the Library
- From: Christiaan Hofman <email@hidden>
- Date: Mon, 23 Aug 2010 20:41:39 +0200
On Aug 23, 2010, at 15:35, Stéphane Sudre wrote:
> Stupid question:
>
> Why is there both cell and control instances of the "same" objects in the Library window of Interface Builder?
>
>
> For instance, you have a Check Box cell and a Check Box control.
>
Uhm, those are not the same objects, they are different objects. One is a cell (NSButtonCell), the other is a control (NSButton). If you don't understand what the difference between a cell and a control is, you really need to read the basic Cocoa docs (in particular the "cell and control programming topics for cocoa.")
> Wouldn't it be better to just have a Check Box object and have IB figuring out which class will be really used depending on the target of the drop (*)?
>
Why? It would also complicate IB a lot, as the objects then would not know what to accept.It is generally a very bad idea for generic operations (like dropping an objects) to require knowledge about specific peculiarities (like this thing about controls and cells.) Moreover, the drop target could in fact accept both controls and cells, and you'd be screwed, for instance when you want it to be a top level object (which is really not such a weird thing.)
> This would reduce the number of objects in the Library and avoid the usual confusion between a cell and a control (the icon is not always helpful).
>
>
>
> * AFAIK, the only real issue would be with the .xib/.nib window being the target of the drop but droppin a cell to this window seems a curious idea.
Christiaan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden