[visionegg] copying Text() objects

Hello, 

Does anybody know what the best way to make multiple copies of a text object?  
copy() and deepcopy() don't seem to work (apparently have trouble copying the 
texture once instantiated).

If this isn't possible, is there any simple construct for iteratively 
instantiating a new text object without having to name it?  This would be ideal 
for creating multiple text characters (each being an individual text object).  
As such, I have to manually create a distinct text object, assign it to a 
unique variable name, then append them in a list.

I've tried the following:

text = []

text.append(Text(text="Hello world!",
                 color=(1.0,1.0,1.0), # alpha is ignored (set with 
max_alpha_param)
                 position=(0,0),
                 font_size=50,
                 font_name = "cour.ttf",
                 anchor='lowerleft')
            )

but I get the following error:

2005-03-22 16:46:02,121 (759) CRITICAL: Traceback (most recent call last):
  File "./displaytext.py", line 82, in ?
    print "text parameters = ", text.constant_parameters.font_name, \
AttributeError: 'list' object has no attribute 'constant_parameters'

text parameters = 
Traceback (most recent call last):
  File "./displaytext.py", line 82, in ?
    print "text parameters = ", text.constant_parameters.font_name, \

Can I thus assume that a Text() object needs to be assigned to a variable (and 
thus cannot be simply stored as a reference in a list structure)?

cheers, 
-=Gabriel Nevarez
Research Programmer
Psychology Department
Cardiff University
http://www.cf.ac.uk/psych


=====================================The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: