Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: outlineView:dataCellForTableColumn:item: and bindings don't mix? Editing doesn't stick.



On 7/30/08 12:52 PM, Corbin Dunn said:

>> I'm trying to use it exactly as used in the
>> DragNDropOutlineView example: to use a cell that will be used for the
>> entire row (ie a full width cell).
>>
>> It works in the test app (which doesn't use bindings), but doesn't
>> work
>> in my app that uses bindings.  I'm able to get the full width cell
>> look,
>> but editing the cell stops working.  I can type a new value for the
>> cell, but pressing return/tab doesn't commit the new value.
>>
>> This short sample shows the problem.
>> <http://www.rogue-research.com/vtk/TreeTestFullWidthBug.zip>
>>
>> Anyone made full width cells work with bindings?
>
>Ah...with bindings. Xcode uses it with bindings, but they don't allow
>the "group rows" to be edited. The trouble is that the bindings go
>with the tablecolumn...and there really isn't a table column in that
>case. Have you tried manually handling the updates yourself w/the
>datasource method?

Corbin,

Your workaround seems to work.  I use
outlineView:setObjectValue:forTableColumn:byItem: and test for the same
conditions I use to make a row "full width" (nil tablecolumn etc).  In
such cases, I use the treenode's represented object (my model) and
update it myself.  I just do nothing in other cases, in which case the
bindings system is still used, happily.

PS: I filed <rdar://6113109>.

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >outlineView:dataCellForTableColumn:item: and bindings don't mix? Editing doesn't stick. (From: "Sean McBride" <email@hidden>)
 >Re: outlineView:dataCellForTableColumn:item: and bindings don't mix? Editing doesn't stick. (From: Corbin Dunn <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.