Changeset 214

Show
Ignore:
Timestamp:
05/04/08 07:48:45 (8 months ago)
Author:
tal
Message:
Added support for changing the binding of a column.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • packages/vanilla/trunk/Lib/vanilla/vanillaList.py

    r211 r214  
    320320        | *"width"* (optional)           | The width of the column. In OS 10.3 and lower the width must be defined for *all* columns if the width is defined for one column. | 
    321321        | *"typingSensitive"* (optional) | A boolean representing that this column should be the column that responds to user key input. Only one column can be flagged as True. If no column is flagged, the first column will automatically be flagged. | 
     322        | *binding* (optional)           | A string indicating which "binding object":http://developer.apple.com/documentation/Cocoa/Reference/CocoaBindingsRef/CocoaBindingsRef.html the column's cell should be bound to. By default, this is "value." You should only override this in very specific cases. | 
    322323 
    323324        *showColumnTitles* Boolean representing if the column titles should be shown or not. Column titles will not be shown in single column lists. 
     
    576577            cell = data.get("cell") 
    577578            editable = data.get("editable") 
     579            binding = data.get("binding", "value") 
    578580            keyPath = "arrangedObjects.%s" % key 
    579581            # check for typing sensitivity. 
     
    614616            if self._arrayController is not None: 
    615617                # assign the key to the binding 
    616                 column.bind_toObject_withKeyPath_options_("value", self._arrayController, keyPath, None) 
     618                column.bind_toObject_withKeyPath_options_(binding, self._arrayController, keyPath, None) 
    617619            # set the editability of the column. 
    618620            # if no value was defined in the column data,