Changeset 528

Show
Ignore:
Timestamp:
04/25/03 00:08:31 (5 years ago)
Author:
sholloway
Message:

Depreciating WeakBind?, LazyProperty?
General cleanup tasks
Demo cleanups

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBFoundation/RBFoundation/ContextApply.py

    r290 r528  
    2020##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    2121 
    22 """Binds calling variables to a callable object, with ordering options. 
    23  
    24 >>> def _TestReturnArgsKw(*args, **kw): 
    25 ...     return args, kw 
    26 ... 
    27 >>> fn = ContextApply(_TestReturnArgsKw, 2,3,5, seven='11') 
    28 >>> fn(13,17,19,twenty='3') 
    29 ((13, 17, 19, 2, 3, 5), {'twenty': '3', 'seven': '11'}) 
    30 >>> fn = ContextApply_p_s(_TestReturnArgsKw, 2,3,5, seven='11') 
    31 >>> fn(13,17,19,twenty='3') 
    32 ((13, 17, 19, 2, 3, 5), {'twenty': '3', 'seven': '11'}) 
    33 >>> fn = ContextApply_s_p(_TestReturnArgsKw, 2,3,5, seven='11') 
    34 >>> fn(13,17,19,twenty='3') 
    35 ((2, 3, 5, 13, 17, 19), {'twenty': '3', 'seven': '11'}) 
    36 >>> fn = ContextApply_p(_TestReturnArgsKw, 2,3,5, seven='11') 
    37 >>> fn(13,17,19,twenty='3') 
    38 ((13, 17, 19), {'twenty': '3'}) 
    39 >>> fn = ContextApply_s(_TestReturnArgsKw, 2,3,5, seven='11') 
    40 >>> fn(13,17,19,twenty='3') 
    41 ((2, 3, 5), {'seven': '11'}) 
    42 >>> fn = ContextApply_0(_TestReturnArgsKw, 2,3,5, seven='11') 
    43 >>> fn(13,17,19,twenty='3') 
    44 ((), {}) 
    45 """ 
     22"""Binds calling variables to a callable object, with ordering options.""" 
    4623 
    4724#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    4926#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    5027 
    51 import weakref 
    52 from WeakBind import BindCallable, WeakBoundCallable, StrongBoundCallable 
     28from BindCallable import _WeakBoundCallable, _StrongBoundCallable 
    5329 
    5430#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    7349#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    7450 
    75 class _StrongContextApply(StrongBoundCallable): 
    76     """Base class for adding positional and keyword based "context" to BoundCallable objects""" 
     51class _StrongContextApply(_StrongBoundCallable): 
     52    """Base class for adding positional and keyword based "context" to StrongBoundCallable objects""" 
     53 
     54    __slots__ = () 
    7755 
    7856    def __init__(self, callback, *args, **kw): 
    79         StrongBoundCallable.__init__(self, callback) 
     57        _StrongBoundCallable.__init__(self, callback) 
    8058        self.SaveContext(args, kw) 
    8159 
    8260    def SaveContext(self, args, kw): 
    83         """Saves extra paramters to be passed to the BoundCallable object.  Creates the "context" part of ContextApply.""" 
     61        """Saves extra paramters to be passed to the StrongBoundCallable object.  Creates the "context" part of ContextApply.""" 
     62        raise NotImplementedError 
     63 
     64class _WeakContextApply(_WeakBoundCallable): 
     65    """Base class for adding positional and keyword based "context" to WeakBoundCallable objects""" 
     66 
     67    __slots__ = () 
     68 
     69    def __init__(self, callback, *args, **kw): 
     70        _WeakBoundCallable.__init__(self, callback) 
     71        self.SaveContext(args, kw) 
     72 
     73    def SaveContext(self, args, kw): 
     74        """Saves extra paramters to be passed to the WeakBoundCallable object.  Creates the "context" part of ContextApply.""" 
     75        raise NotImplementedError 
     76 
     77#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     78 
     79class ContextApply_p_s_mixin(object): 
     80    """BoundCallable object whose parameters will be "constructed" in the following order: 
     81        - Passed from calling code, 
     82        - Saved context, 
     83    """ 
     84    __slots__ = ('args', 'kw') 
     85    def SaveContext(self, args, kw): 
    8486        self.args = args 
    8587        self.kw = kw 
    8688 
    87 class _WeakContextApply(WeakBoundCallable): 
    88     """Base class for adding positional and keyword based "context" to BoundCallable objects""" 
    89  
    90     def __init__(self, callback, *args, **kw): 
    91         WeakBoundCallable.__init__(self, callback) 
    92         self.SaveContext(args, kw) 
    93  
    94     def SaveContext(self, args, kw): 
    95         """Saves extra paramters to be passed to the BoundCallable object.  Creates the "context" part of ContextApply.""" 
     89    def __call__(self, *args, **kw): 
     90        return self._DoCall(*(args + self.args), **_JoinKW(kw, self.kw)) 
     91 
     92class ContextApply_s_p_mixin(object): 
     93    """BoundCallable object whose parameters will be "constructed" in the following order: 
     94        - Saved context, 
     95        - Passed from calling code, 
     96    """ 
     97    __slots__ = ('args', 'kw') 
     98    def SaveContext(self, args, kw): 
    9699        self.args = args 
    97100        self.kw = kw 
    98101 
    99 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    100  
    101 class ContextApply_p_s_mixin(object): 
     102    def __call__(self, *args, **kw): 
     103        return self._DoCall(*(self.args + args), **_JoinKW(self.kw, kw)) 
     104 
     105class ContextApply_p_mixin(object): 
    102106    """BoundCallable object whose parameters will be "constructed" in the following order: 
    103107        - Passed from calling code, 
     108 
     109    Note: This is the same as calling the BoundCallable directly, but appears here for completeness. 
     110    """ 
     111    __slots__ = () 
     112    def SaveContext(self, args, kw): pass 
     113    def __call__(self, *args, **kw): 
     114        return self._DoCall(*args, **kw) 
     115 
     116class ContextApply_s_mixin(object): 
     117    """BoundCallable object whose parameters will be "constructed" in the following order: 
    104118        - Saved context, 
    105119 
    106      
    107     """ 
    108     def __call__(self, *args, **kw): 
    109         return self._DoCall(*(args + self.args), **_JoinKW(kw, self.kw)) 
    110  
    111 class ContextApply_s_p_mixin(object): 
    112     """BoundCallable object whose parameters will be "constructed" in the following order: 
    113         - Saved context, 
    114         - Passed from calling code, 
    115     """ 
    116     def __call__(self, *args, **kw): 
    117         return self._DoCall(*(self.args + args), **_JoinKW(self.kw, kw)) 
    118  
    119 class ContextApply_p_mixin(object): 
    120     """BoundCallable object whose parameters will be "constructed" in the following order: 
    121         - Passed from calling code, 
    122  
    123     Note: This is the same as calling the BoundCallable directly, but appears here for completeness. 
    124     """ 
    125     def SaveContext(self, args, kw): pass 
    126     def __call__(self, *args, **kw): 
    127         return self._DoCall(*args, **kw) 
    128  
    129 class ContextApply_s_mixin(object): 
    130     """BoundCallable object whose parameters will be "constructed" in the following order: 
    131         - Saved context, 
    132  
    133120    Note: The parameters from the calling code will be completely ignored. 
    134121    """ 
     122    __slots__ = ('args', 'kw') 
     123    def SaveContext(self, args, kw): 
     124        self.args = args 
     125        self.kw = kw 
     126 
    135127    def __call__(self, *args, **kw): 
    136128        return self._DoCall(*self.args, **self.kw) 
     
    143135    Note: The parameters from both the calling code and the "context" will be completely ignored. 
    144136    """ 
     137    __slots__ = () 
    145138    def SaveContext(self, args, kw): pass 
    146139    def __call__(self, *args, **kw): 
  • trunk/RBFoundation/RBFoundation/ObjectifiedXMLParser.py

    r253 r528  
    2525 
    2626from xml.parsers.expat import ParserCreate as _ParserCreate 
    27 from WeakBind import BindCallable 
     27from BindCallable import WeakBindCallable as _WeakBindCallable 
    2828 
    2929#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    4242        parser = _ParserCreate(self._encoding, self._seperator) 
    4343        parser.returns_unicode = self._encoding != 'ASCII' and 1 or 0 
    44         parser.StartElementHandler = BindCallable(self.StartElementHandler) 
    45         parser.EndElementHandler = BindCallable(self.EndElementHandler) 
    46         parser.CharacterDataHandler = BindCallable(self.CharacterDataHandler) 
    47         parser.StartNamespaceDeclHandler = BindCallable(self.StartNamespaceDeclHandler) 
    48         parser.EndNamespaceDeclHandler = BindCallable(self.EndNamespaceDeclHandler) 
     44        parser.StartElementHandler = _WeakBindCallable(self.StartElementHandler) 
     45        parser.EndElementHandler = _WeakBindCallable(self.EndElementHandler) 
     46        parser.CharacterDataHandler = _WeakBindCallable(self.CharacterDataHandler) 
     47        parser.StartNamespaceDeclHandler = _WeakBindCallable(self.StartNamespaceDeclHandler) 
     48        parser.EndNamespaceDeclHandler = _WeakBindCallable(self.EndNamespaceDeclHandler) 
    4949        return parser.Parse(*args, **kw) 
    5050 
     
    5353        parser = _ParserCreate(self._encoding, self._seperator) 
    5454        parser.returns_unicode = self._encoding != 'ASCII' and 1 or 0 
    55         parser.StartElementHandler = BindCallable(self.StartElementHandler) 
    56         parser.EndElementHandler = BindCallable(self.EndElementHandler) 
    57         parser.CharacterDataHandler = BindCallable(self.CharacterDataHandler) 
    58         parser.StartNamespaceDeclHandler = BindCallable(self.StartNamespaceDeclHandler) 
    59         parser.EndNamespaceDeclHandler = BindCallable(self.EndNamespaceDeclHandler) 
     55        parser.StartElementHandler = _WeakBindCallable(self.StartElementHandler) 
     56        parser.EndElementHandler = _WeakBindCallable(self.EndElementHandler) 
     57        parser.CharacterDataHandler = _WeakBindCallable(self.CharacterDataHandler) 
     58        parser.StartNamespaceDeclHandler = _WeakBindCallable(self.StartNamespaceDeclHandler) 
     59        parser.EndNamespaceDeclHandler = _WeakBindCallable(self.EndNamespaceDeclHandler) 
    6060        return parser.ParseFile(*args, **kw) 
    6161 
  • trunk/RBFoundation/RBFoundation/SubObs/LogicRules/BaseCollection.py

    r396 r528  
    2525 
    2626import weakref 
    27 from RBFoundation import WeakBind 
     27from RBFoundation import BindCallable as _BindCallable 
    2828 
    2929#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    6161class WeakWrapCallableMixin(object): 
    6262    def _WrapCallable(self, Callable): 
    63         result = WeakBind.WeakBindCallable(Callable, self.Remove) 
     63        result = _BindCallable.WeakBindCallable(Callable, self.Remove) 
    6464        return result 
    6565 
  • trunk/RBFoundation/RBFoundation/Utilities.py

    r516 r528  
    6161    return cleanupstrlst(data.split(splitchar), *args, **kw) 
    6262 
    63 #~ iso formated time information ~~~~~~~~~~~~~~~~~~~~ 
    64  
    65 def fromisoformat(strtime, sectionsep='T', datesep='-', timesep=':'): 
    66     """ISO 8601 format, YYYY-MM-DDTHH:MM:SS 
    67     returns (YYYY, MM, DD, HH, MM, SS, -1, -1, -1) 
    68     compatible with time module's mktime method.""" 
    69     datesent, timesent = strtime.split(sectionsep)[:2] 
    70     datesent = map(int, datesent.split(datesep)[:3]) 
    71     timesent = map(int, timesent.split(timesep)[:3]) 
    72     return tuple(datesent + timesent + (-1,-1,-1)) 
    73  
    74 def fromisoformat_date(strtime, datesep='-'): 
    75     """ISO 8601 format, YYYY-MM-DDTHH:MM:SS 
    76     returns (YYYY, MM, DD)""" 
    77     datesent = map(int, datesent.split(datesep)[:3]) 
    78     return tuple(datesent) 
    79  
    80 def fromisoformat_time(strtime, timesep=':'): 
    81     """ISO 8601 format, YYYY-MM-DDTHH:MM:SS 
    82     returns (HH, MM, SS)""" 
    83     timesent = map(int, timesent.split(timesep)[:3]) 
    84     return tuple(datesent) 
    85  
    86 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    87  
    88 def UnpackCallTuple(calltuple): 
    89     """Seperates calltuple into (call, args or (), kw or {}) 
    90  
    91     Nasty shorthand that consistently allows for variable length tuples. 
    92     """ 
    93     return (calltuple[0], # callable 
    94         (calltuple[1:2] or ((),))[0], # args or () 
    95         (calltuple[2:3] or ({},))[0]) # kw or () 
    96  
    97 def CallTuple(calltuple): 
    98     """Uses CallTupleUnpack to invoke the calltuple""" 
    99     call, args, kw = CallTupleUnpack(calltuple) 
    100     return call(*args, **kw) 
    101  
    10263#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    10364#~ Testing  
  • trunk/RBFoundation/RBFoundation/XMLBuilder.py

    r524 r528  
    3838 
    3939from xml.parsers.expat import ParserCreate as _ExpatParserCreate 
    40 from WeakBind import BindCallable as _BindCallable 
     40from BindCallable import WeakBindCallable, Curry 
    4141from XMLNamespaceMap import XMLNamespaceMap 
    42 from Utilities import CallTuple 
    4342 
    4443#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    155154 
    156155        if isinstance(build_factory, tuple): 
    157             newelement = CallTuple(build_factory) 
     156            newelement = Curry.callTuple(build_factory) 
    158157        else: 
    159158            newelement = build_factory(*args) 
     
    213212        parser = _ExpatParserCreate(self._encoding, self._seperator) 
    214213        parser.returns_unicode = self._encoding != 'ASCII' and 1 or 0 
    215         parser.StartElementHandler = _BindCallable(self._start_element) 
    216         parser.EndElementHandler = _BindCallable(self._end_element) 
    217         parser.CharacterDataHandler = _BindCallable(self._char_data) 
    218         parser.StartNamespaceDeclHandler = _BindCallable(self._start_namespace_decl_handler) 
    219         parser.EndNamespaceDeclHandler = _BindCallable(self._end_namespace_decl_handler) 
     214        parser.StartElementHandler = WeakBindCallable(self._start_element) 
     215        parser.EndElementHandler = WeakBindCallable(self._end_element) 
     216        parser.CharacterDataHandler = WeakBindCallable(self._char_data) 
     217        parser.StartNamespaceDeclHandler = WeakBindCallable(self._start_namespace_decl_handler) 
     218        parser.EndNamespaceDeclHandler = WeakBindCallable(self._end_namespace_decl_handler) 
    220219        return parser 
    221220 
  • trunk/RBFoundation/test/test_doctests.py

    r403 r528  
    2424#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    2525 
    26 from RBFoundation import WeakBind, ContextApply, Utilities, LazyProperty, ChainedDict, AttributedDict, Acquisition, IndexedProperty 
     26from RBFoundation import ContextApply, Utilities, ChainedDict, AttributedDict, Acquisition, IndexedProperty 
    2727 
    2828#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBJabber/RBJabber/JabberConnection.py

    r397 r528  
    4040from RBFoundation.XMLClassBuilder import XMLClassBuilderMixin 
    4141from RBFoundation import SmartSelect 
    42 from RBFoundation.WeakBind import BindCallable 
     42from RBFoundation.BindCallable import BindCallable 
    4343import JID 
    4444import sys 
  • trunk/RBJabber/RBJabber/JabberObserver.py

    r400 r528  
    2424#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    2525 
    26 from RBFoundation.WeakBind import BoundCallable, BindCallable 
     26from RBFoundation.BindCallable import BoundCallable, BindCallable 
    2727import JID 
    2828 
  • trunk/RBJabber/RBJabber/JabberSubject.py

    r400 r528  
    2626from SubjectObserver.CategorySubject import CategorySubjectBaseMixin 
    2727from SubjectObserver import ProxyBidableCategorySubjectMixin 
    28 from RBFoundation.WeakBind import BoundCallableBase 
     28from RBFoundation.BindCallable import BoundCallableBase 
    2929import JID 
    3030 
  • trunk/RBJabber/RBJabber/SubjectObserver/AssociativeObserver.py

    r400 r528  
    3030#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3131 
    32 from RBFoundation.WeakBind import BindCallable 
     32from RBFoundation.BindCallable import BindCallable 
    3333import ProxyBidableCategorySubjectMixin 
    3434 
  • trunk/RBJabber/RBJabber/SubjectObserver/CategorySubject.py

    r400 r528  
    3030 
    3131from Subject import Subject 
    32 from RBFoundation import WeakBind 
     32from RBFoundation import BindCallable 
    3333import bisect 
    3434 
     
    4747     
    4848    def AddObserver(self, category, observer, priority=0): 
    49         result = WeakBind.BindCallable(observer) 
     49        result = BindCallable.BindCallable(observer) 
    5050        bisect.insort(self._observers.setdefault(category,[]), (-priority, result)) 
    5151        return self 
    5252 
    5353    def RemoveObserver(self, observer): 
    54         result = WeakBind.BindCallable(observer) 
     54        result = BindCallable.BindCallable(observer) 
    5555        for observers in self._observers.itervalues(): 
    5656            observers[:] = [x for x in observers if x[-1] != result] 
  • trunk/RBJabber/RBJabber/SubjectObserver/Observer.py

    r400 r528  
    3030#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3131 
    32 from RBFoundation.WeakBind import BoundCallable, BindCallable 
     32from RBFoundation.BindCallable import BoundCallable, BindCallable 
    3333 
    3434#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBJabber/RBJabber/SubjectObserver/SchedulerSubject.py

    r400 r528  
    2727 
    2828import bisect, time 
    29 from RBFoundation import WeakBind 
     29from RBFoundation import BindCallable 
    3030 
    3131#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    3535class SchedulerSubject(object): 
    3636    def __init__(self, TimeFn=time.time): 
    37         self._TimeFn = WeakBind.BindCallable(TimeFn) 
     37        self._TimeFn = BindCallable.BindCallable(TimeFn) 
    3838        self._LastTime = 0 
    3939        self._events = [] 
     
    4747 
    4848    def AddEvent(self, Time, observer): 
    49         result = Time, WeakBind.BindCallable(observer) 
     49        result = Time, BindCallable.BindCallable(observer) 
    5050        bisect.insort(self._events, result) 
    5151        return self 
    5252 
    5353    def RemoveEvent(self, observer): 
    54         result = WeakBind.BindCallable(observer) 
     54        result = BindCallable.BindCallable(observer) 
    5555        self._events[:] = [x for x in self._events if x[-1] != result] 
    5656        return self 
  • trunk/RBJabber/RBJabber/SubjectObserver/Subject.py

    r400 r528  
    2525no longer exisits or is explicitly released. 
    2626 
    27 WeakBind module is used extensively to prevent reference chains keeping objects in 
     27BindCallable module is used extensively to prevent reference chains keeping objects in 
    2828memory unnecessarily.""" 
    2929 
     
    3232#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3333 
    34 from RBFoundation import WeakBind 
     34from RBFoundation import BindCallable 
    3535import bisect 
    3636 
     
    5656        """Adds observer to the internal collection monitoring this subject 
    5757        Observer is assumed to be a callable object.""" 
    58         result = WeakBind.BindCallable(observer) 
     58        result = BindCallable.BindCallable(observer) 
    5959        bisect.insort(self._observers, (-priority, result)) 
    6060        return self 
     
    6363        """Removes observer from the internal collection monitoring this subject.   
    6464        Observer should be the same object that was passed to AddObserver.""" 
    65         result = WeakBind.BindCallable(observer) 
     65        result = BindCallable.BindCallable(observer) 
    6666        self._observers[:] = [x for x in self._observers if x[-1] != result] 
    6767        return self 
  • trunk/RBJabber/RBJabber/iqAuthQuery.py

    r397 r528  
    2626import weakref, sha 
    2727from xml.sax.saxutils import escape, quoteattr 
    28 from RBFoundation.WeakBind import BindCallable 
     28from RBFoundation.BindCallable import BindCallable 
    2929from iqQuery import iqQueryBase 
    3030  
  • trunk/RBJabber/RBJabber/iqQuery.py

    r397 r528  
    2626import weakref 
    2727from xml.sax.saxutils import escape, quoteattr 
    28 from RBFoundation.WeakBind import BindCallable 
     28from RBFoundation.BindCallable import BindCallable 
    2929import JabberObserver as JObs 
    3030import JID 
  • trunk/RBJabber/RBJabber/iqResponse.py

    r397 r528  
    2828import weakref 
    2929from xml.sax.saxutils import escape, quoteattr 
    30 from RBFoundation.WeakBind import BindCallable 
     30from RBFoundation.BindCallable import BindCallable 
    3131import JabberObserver as JObs 
    3232import JID 
  • trunk/RBJabber/RBJabber/iqRosterQuery.py

    r400 r528  
    2626import weakref 
    2727from xml.sax.saxutils import escape, quoteattr 
    28 from RBFoundation.WeakBind import BindCallable 
     28from RBFoundation.BindCallable import BindCallable 
    2929from SubjectObserver.CategorySubject import CategorySubject 
    3030from iqQuery import iqQueryBase 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/Blending.py

    r398 r528  
    2525 
    2626from RBRapier.Renderer.AttributeMgr import AttributeChangeElement 
    27 from RBFoundation.LazyProperty import LazyProperty 
     27from RBFoundation.Objects.Properties import LazyProperty 
    2828from OpenGL import GL 
    2929 
     
    7070            from OpenGL.GL.EXT import blend_func_separate 
    7171            self.blend_func_separate = blend_func_separate.glInitBlendFuncSeparateEXT() and blend_func_separate or None 
    72     _extensions = LazyProperty('_extensions', _Extensions) 
     72    _extensions = LazyProperty(_Extensions) 
    7373 
    7474    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    106106            from OpenGL.GL.EXT import blend_color 
    107107            self.blend_color = blend_color.glInitBlendColorEXT() and blend_color or None 
    108     _extensions = LazyProperty('_extensions', _Extensions) 
     108    _extensions = LazyProperty(_Extensions) 
    109109 
    110110    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    134134            from OpenGL.GL.EXT import blend_minmax 
    135135            self.blend_minmax = blend_minmax.glInitBlendMinmaxEXT() and blend_minmax or None 
    136     _extensions = LazyProperty('_extensions', _Extensions) 
     136    _extensions = LazyProperty(_Extensions) 
    137137 
    138138    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/PointRasterization.py

    r398 r528  
    2525 
    2626from OpenGL import GL 
    27 from RBFoundation.LazyProperty import LazyProperty 
     27from RBFoundation.Objects.Properties import LazyProperty 
    2828from RBRapier.Tools import Vector 
    2929from RBRapier.Renderer.AttributeMgr import AttributeChangeElement 
     
    8888            from OpenGL.GL.EXT import point_parameters 
    8989            self.point_parameters = point_parameters.glInitPointParametersEXT() and point_parameters or None 
    90     _extensions = LazyProperty('_extensions', _Extensions) 
     90    _extensions = LazyProperty(_Extensions) 
    9191 
    9292    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Renderer/ChangeBaseMgr.py

    r457 r528  
    2525 
    2626from RBFoundation.SubObs.Basic import SubjectList 
    27 from RBFoundation.LazyProperty import LazyProperty 
     27from RBFoundation.Objects.Properties import LazyProperty 
    2828 
    2929#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    3535 
    3636class DynamicChangeElementBase(ChangeElementBase): 
    37     Trackers = LazyProperty('Tracker', SubjectList) 
     37    Trackers = LazyProperty(SubjectList) 
    3838 
    3939#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBSkinning/RBSkinning/XMLSkinner.py

    r516 r528  
    2525 
    2626from RBFoundation.XMLClassBuilder import XMLClassBuilder 
    27 from RBFoundation.WeakBind import BindCallable 
     27from RBFoundation.BindCallable import BindCallable 
    2828import SkinContext 
    2929import SkinObject 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/bitmap.py

    r472 r528  
    4545    def SetBitmapRollover(self, rollover): 
    4646        if not self._rollover_events: 
    47             from RBSkinning.wxTools.wxWeakBind import wxBindCallable 
     47            from RBFoundation.BindCallable import BindCallable 
    4848            from RBSkinning.wxTools.wxRolloverEvents import wxRolloverEvents 
    4949            self._rollover_events = wxRolloverEvents() 
    50             self._rollover_events.OnMouseEnter = wxBindCallable(self._SetRolloverBitmap) 
    51             self._rollover_events.OnMouseLeave = wxBindCallable(self._SetNonRolloverBitmap) 
     50            self._rollover_events.OnMouseEnter = BindCallable(self._SetRolloverBitmap) 
     51            self._rollover_events.OnMouseLeave = BindCallable(self._SetNonRolloverBitmap) 
    5252            self.PushEventHandler(self._rollover_events) 
    5353        self._rollover_bitmap = rollover 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/bitmap_button.py

    r472 r528  
    4545    def SetBitmapRollover(self, rollover): 
    4646        if not self._rollover_events: 
    47             from RBSkinning.wxTools.wxWeakBind import wxBindCallable 
     47            from RBFoundation.BindCallable import BindCallable 
    4848            from RBSkinning.wxTools.wxRolloverEvents import wxRolloverEvents 
    4949            self._rollover_events = wxRolloverEvents() 
    50             self._rollover_events.OnMouseEnter = wxBindCallable(self._SetRolloverBitmap) 
    51             self._rollover_events.OnMouseLeave = wxBindCallable(self._SetNonRolloverBitmap) 
     50            self._rollover_events.OnMouseEnter = BindCallable(self._SetRolloverBitmap) 
     51            self._rollover_events.OnMouseLeave = BindCallable(self._SetNonRolloverBitmap) 
    5252            self.PushEventHandler(self._rollover_events) 
    5353        self._rollover_bitmap = rollover 
  • trunk/RBSkinning/RBSkinning/wxTools/wxFrameMover.py

    r488 r528  
    3131import weakref 
    3232from wxPython import wx 
    33 from RBSkinning.wxTools.wxWeakBind import wxBindCallable 
    3433 
    3534#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBSkinning/RBSkinning/wxTools/wxLockingFrame.py

    r502 r528  
    2929#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3030 
    31 from wxWeakBind import wxBindCallable 
     31import weakref 
    3232from wxPython import wx 
    33 import weakref 
     33from RBFoundation.BindCallable import BindCallable 
    3434 
    3535#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    130130        wx.wxFrame.__init__(self, *args, **kw) 
    131131 
    132         wx.EVT_SIZE(self, wxBindCallable(self._OnSizeFrame)) 
    133         wx.EVT_MOVE(self, wxBindCallable(self._OnMoveFrame)) 
     132        wx.EVT_SIZE(self, BindCallable(self._OnSizeFrame)) 
     133        wx.EVT_MOVE(self, BindCallable(self._OnMoveFrame)) 
    134134        self.PushEventHandler(wx.wxEvtHandler()) 
    135135 
  • trunk/RBSkinning/RBSkinning/wxTools/wxRolloverEvents.py

    r395 r528  
    2929 
    3030from wxPython import wx 
    31 from RBSkinning.wxTools.wxWeakBind import wxBindCallable 
     31from RBFoundation.BindCallable import BindCallable 
    3232 
    3333#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    4949 
    5050    def _CaptrueEvents(self): 
    51         wx.EVT_ENTER_WINDOW(self, wxBindCallable(self._OnMouseEnter)) 
    52         wx.EVT_LEAVE_WINDOW(self, wxBindCallable(self._OnMouseLeave)) 
     51        wx.EVT_ENTER_WINDOW(self, BindCallable(self._OnMouseEnter)) 
     52        wx.EVT_LEAVE_WINDOW(self, BindCallable(self._OnMouseLeave)) 
    5353 
    5454    def _OnMouseEnter(self, evt): 
  • trunk/RBSkinning/demo/wxPythonSkin/components/component_example.py

    r496 r528  
    7474        return MyComponentModel(self.context) 
    7575 
     76#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     77#~ Main  
     78#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     79 
     80if __name__=='__main__': 
     81    print "Run component_app.py or component_app_adv.py to use this file" 
     82 
  • trunk/RBSkinning/demo/wxPythonSkin/ctypes/winChangeDisplaySettings.py

    r501 r528  
    4242                <layout sizercfg='1, wxEXPAND' > 
    4343                    <button label='800x600'> 
    44                         <event type='EVT_BUTTON' call='ctx.behaviormodel.Change800x600' /> 
     44                        <command_event type='EVT_BUTTON' call='ctx.behaviormodel.Change800x600' /> 
    4545                    </button> 
    4646                    <button label='1024x768'> 
    47                         <event type='EVT_BUTTON' call='ctx.behaviormodel.Change1024x768' /> 
     47                        <command_event type='EVT_BUTTON' call='ctx.behaviormodel.Change1024x768' /> 
    4848                    </button> 
    4949                    <button label='Change Back'> 
    50                         <event type='EVT_BUTTON' call='ctx.behaviormodel.ChangeBack' /> 
     50                        <command_event type='EVT_BUTTON' call='ctx.behaviormodel.ChangeBack' /> 
    5151                    </button> 
    5252                </layout> 
  • trunk/RBSkinning/demo/wxPythonSkin/docking/docking_single_and_multiple.py

    r504 r528  
    2626from wxPython import wx 
    2727from RBSkinning import StandardXMLSkinner 
    28 from RBFoundation.WeakBind import BindCallable 
     28from RBFoundation.BindCallable import BindCallable 
    2929 
    3030#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBSkinning/demo/wxPythonSkin/grafting/graft_layout.py

    r504 r528  
    4242                            <command_event type='EVT_BUTTON' call='ctx.behaviormodel.Add' /> 
    4343                        </button> 
    44                         <button label='Remove'> 
    45                             <command_event type='EVT_BUTTON' call='ctx.behaviormodel.Remove' /> 
     44                        <button label='Remove All'> 
     45                            <command_event type='EVT_BUTTON' call='ctx.behaviormodel.RemoveAll' /> 
    4646                        </button> 
    4747                    </layout> 
     
    8080        self.graftlayout.Layout() 
    8181 
    82     def Remove(self, evt): 
     82    def RemoveAll(self, evt): 
    8383        # Remove all the children from the panel 
    8484        while self.graftlayout.Remove(0): pass 
  • trunk/RBSkinning/demo/wxPythonSkin/widgets/htmlwindow.html

    r512 r528  
    33        <h1>This is a test!</h1> 
    44        This is a test of the wxHTML widget<br> 
    5         <center> 
    6             <wxPythonSkin invoke='wxPythonSkinTagWidgetTest'/> 
    7         </center> 
    85    </body> 
    96</html> 
  • trunk/RBSkinning/demo/wxPythonSkin/widgets/htmlwindow.py

    r512 r528  
    4646                        </panel> 
    4747                    </skin:section> 
    48                     <htmlwindowex sizercfg='1, wxEXPAND' address='htmlwindow.html'/> 
     48                    <htmlwindow sizercfg='1, wxEXPAND' address='htmlwindow.html'/> 
    4949                </layout>  
    5050            </panel> 
  • trunk/RBSkinning/plans/todo.txt

    r512 r528  
    44    wxScrollWindow 
    55    wxGauge 
    6     wxImageList: 
    7         Plug image id into appropriate widgets  
    8         Set *shared* image lists 
    96    wxMultisash: 
    107        Will be tough... 
  • trunk/RBTelepathy/RBTelepathy/SocketConnections.py

    r445