Changeset 261

Show
Ignore:
Timestamp:
08/03/02 00:54:10 (6 years ago)
Author:
sholloway
Message:

Added SkinObject?.PopContext? to mirror SkinObject?.PushContext?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBSkinning/RBSkinning/SkinObject.py

    r253 r261  
    9191 
    9292    def PushContext(self, force=0): 
    93         """Returns the replaced context""" 
     93        """Adds a context to the stack, if needed or forced. 
     94        Returns the resultant context.""" 
    9495        result = self.context 
    9596        if force or (self.parent() and self.parent().context is self.context): 
    9697            self.context = SkinContext.SkinContext(self.context) 
     98        return result 
     99 
     100    def PopContext(self, force=0): 
     101        """Removes a context from the stack if owned or forced. 
     102        Returns the resultant context.""" 
     103        result = self.context 
     104        if force or (self.parent() and self.parent().context is not self.context): 
     105            self.context = self.context._NextContext 
    97106        return result 
    98107