Changeset 4322

Show
Ignore:
Timestamp:
07/28/08 12:51:58 (4 months ago)
Author:
ed
Message:

Removed the incorrect appliesToClass() for ListEvents? - they should only apply to dListControl objects. Renamed this class 'ListControlEvent?' to remove any confusion. Thanks to Steve Rose for finding this bug.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/dEvents.py

    r4092 r4322  
    166166 
    167167 
    168 class ListEvent(dEvent): 
    169     def appliesToClass(eventClass, objectClass): 
    170         return issubclass(objectClass, (dabo.ui.dListControl, dabo.ui.dListBox)) 
     168class ListControlEvent(dEvent): 
     169    def appliesToClass(eventClass, objectClass): 
     170        return issubclass(objectClass, (dabo.ui.dListControl, )) 
    171171    appliesToClass = classmethod(appliesToClass) 
    172172 
     
    543543 
    544544 
    545 class ListSelection(ListEvent): 
    546     """ Occurs when an item is highlighted in a list.""" 
    547     pass 
    548  
    549  
    550 class ListDeselection(ListEvent): 
    551     """ Occurs when a selected item is deselected in a list.""" 
     545class ListSelection(ListControlEvent): 
     546    """ Occurs when an item is highlighted in a list control.""" 
     547    pass 
     548 
     549 
     550class ListDeselection(ListControlEvent): 
     551    """ Occurs when a selected item is deselected in a list control.""" 
    552552    pass 
    553553