From: Bruce S. <Bru...@nc...> - 2005-12-16 04:38:23
|
For completeness, I tried this on an old version of VPython (Python 2.3 plus Visual from October 2003). Both in that old version and the current one, when an object is made invisible it is also removed from the display.objects and frame.objects lists. This seems like a design flaw, since as you point out once the object has been removed from the list you can't find it that way. You'd have to keep a copy of the list before making anything invisible. I have a very dim recollection that this was supposed to be a feature, not a bug, that if an object was invisible you didn't want to be told about it while looking through the list of objects. Does anyone remember anything about this? At the moment (admittedly it's late at night, so I might be thinking fuzzily) it seems much better to keep the invisible objects in the lists so that you can reference them again through the list, as you tried to do. Looping through the list you could easily skip objects that are invisible, if that's what you want to do. Bruce Sherwood Jeremy Sachs wrote: > The VPython documentation says that the objects in a frame can be > made "temporarily invisible" with the following: > > for obj in someframe.objects: > obj.visible=0 > > And that works, only not temporarily. For any other object, I can set > the "visible" property to 1 and that object will be drawn. I can't > get this to work with the contents of a frame. Am I overlooking > something? There are three labels in the frame, as well as more > typical objects, but I don't suspect them to be the source of the > problem. Could someone please offer a suggestion? > > -Jeremy S. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |