Hmmm... Also a good way of doing it. But the fact that you've done it
too implies to me that it might be a feature that needs to make it's way
back into the core files :)
Also, I'm still kind of new to this, but I *think* the del loop may be
unnecessary. I'm pretty sure that if you were to just "forget" about
the existing list, python's garbage collector should deal with it properly.
Tony
Mark Halko wrote:
Tony,
I did this slightly differently by deriving my own class from the presentation class:
class NewPresentation(VisionEgg.FlowControl.Presentation): def remove_all_controllers(self) : if len(self.controllers) > 0 : for i in self.controllers : del i self.controllers = [] self.num_frame_controllers = 0
I think this is also does what you're attempting to do. (without having to edit the visionegg core files).
Mark
On May 30, 2005, at 12:02 PM, Tony Arkles wrote:
Awww... I didn't properly highlight the changes I made. The "if" line directly above the highlighted area got changed too.
Tony
====================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html
====================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html
====================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html