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: Tue, 24 Aug 2010 14:26:12 +0200
On Aug 24, 2010, at 12:30, Hamish Allan wrote:
> On Tue, Aug 24, 2010 at 11:05 AM, Christiaan Hofman <email@hidden> wrote:
>
>> You would not get that. The cells are generally setup in a far different way than the controls, because it should be appropriate for a table rather than a stand-alone control. So you would still need two objects. Gain nothing, lose a lot of information, and in fact confuse things because you now lose the context of cells when you need a cell, but get a larger number of "controls or cells."
>
> How does any of this relate to the library, i.e. the palette of
> droppable items?
Categories (see my other email).
> Once the item is dropped and the decision is made as
> to whether it is a control or a cell, its context is clear.
>
But not before, and that's the point. When you drag a cell, IB knows that you're dragging a cell, and then that information can be used. E.g. if I drop a cell on an NSTableView, it will immediately fall through to the NSTableColumn. When you drag a control/cell, then it will be interpreted first as an control added as a subview to the NSTableView. And you'd have a hard time forcing it as a cell in the NSTableColumn. So you lose the ability to be specific and to say to IB "I want to drop a cell." And this is just an example of a class I know. What about that fancy view class that you and I (and Apple) does not know about yet? How would that behave?
>> Well, that's my point. The drop target knows what to accept because it is told what to expect in the drop and therefore can choose whether to accept. Now you're saying to confuse and remove the information about what it's getting from the drop (is it a cell? is it a control? it's superman!) and it won't be able to make that choice anymore (there's no NSMaybeCellOrControl object, they're in very different parts of the object hierarchy, and see my remark below).
>
> Stop setting up straw men and read what Stéphane is actually
> proposing: "Last time I checked, it was possible to add multiple
> representations of an object in the pasteboard for a drag operations."
>
>> Because the layout controller may not be able to make the choice, as I said below. Moreover it's not supported by the generic way the IB plugins work.
>
> Would it be impossible for the user to be presented with a popup menu
> in those rare cases in which the drop target could accept either a
> control or a cell?
>
> H
Of course it's possible. But it would complicate things, and would require extra user actions. So in fact that's another argument against.
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