[wxPython-users] Multiple copies to clipboard
Robin Dunn
robin at alldunn.com
Thu Mar 1 10:21:33 PST 2007
Marcio Moreira wrote:
> Friends,
>
> Below is a sample code that shows my problem. I can copy one text to
> clipboard but can't copy more than one text. I get an "Bus Error" on my
> system: Mac OS X 10.3.9, Python 2.3, wxPython 2.7.2
>
> If I use "for num in range(1):" it works. But if I use "for num in
> range(2):" or greater number, "wx.TheClipboard.AddData(objeto_texto)" (I
> believe) crashes my program.
You are adding the same data object instance to the clipboard multiple
times. I expect that it would work if you create a new instance for the
new objects. On the other hand, I don't believe that putting multiple
objects of the same type in the clipboard will do you any good. The
purpose of having more than one piece of data in the clipboard is so the
receiving app can choose one of several formats to paste. For example,
text, bitmap, or a custom format.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list