Re: [wxPython-users] STC and clipboard???

1 view
Skip to first unread message

Bruce Who

unread,
Jun 8, 2005, 9:47:44 PM6/8/05
to wxPytho...@lists.wxwidgets.org
Robin Dunn:

======= 2005-06-08 05:19:55 Robin Dunn wrote: =======

>Bruce Who wrote:
>> Hi,
>>
>> I have an application using STC as text-editor. User can cut/copy
>> text and paste it to somewhere, but the text is cleared in the
>> clipboard after my app terminates! So I'd like to know how to keep
>> the cutted/copied text in the clipboard after the app terminates?
>
>Use wx.TheClipboard.Flush(), but keep in mind that it could cause the
>memory used by the current contents of the clipboard to never be
>deallocated.

Then wx.TheClipboard.Flush() may cause a memory leak problem? Is it possible to avoid this? What about Notepad and other applications? Do they all handle clipboard stuff this way?


>
>--
>Robin Dunn
>Software Craftsman
>http://wxPython.org Java give you jitters? Relax with wxPython!
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wxPython-user...@lists.wxwidgets.org
>For additional commands, e-mail: wxPython-...@lists.wxwidgets.org
>

= = = = = = = = = = = = = = = = = = = =

Best regards,

        Bruce Who
          2005-06-09


tynia yang

unread,
Jun 9, 2005, 2:17:59 AM6/9/05
to wxPytho...@lists.wxwidgets.org
Hi,
I'm new to wxPython but can't seem to find the answer to this
anywhere. I'm using wxPython2.6 with Python2.3, for Windows.

I am using the glCanvas, but don't understand the constant redrawing.
It seems like onPaint is called constantly, and my scene is always
redrawing even when nothing has changed. I wrote my own draw()
function, and I call it every time I make a change to the scene, but
then the scene doesn't redraw if say, I move the glCanvas out from
under another window. Can someone tell me if there is a way to not
redraw my scene constantly?

Thanks,
tynia

Robin Dunn

unread,
Jun 9, 2005, 2:05:24 PM6/9/05
to wxPytho...@lists.wxwidgets.org
Bruce Who wrote:
> Robin Dunn:
>
> ======= 2005-06-08 05:19:55 Robin Dunn wrote: =======
>
>
>> Bruce Who wrote:
>>
>>> Hi,
>>>
>>> I have an application using STC as text-editor. User can cut/copy
>>> text and paste it to somewhere, but the text is cleared in the
>>> clipboard after my app terminates! So I'd like to know how to
>>> keep the cutted/copied text in the clipboard after the app
>>> terminates?
>>
>> Use wx.TheClipboard.Flush(), but keep in mind that it could cause
>> the memory used by the current contents of the clipboard to never
>> be deallocated.
>
>
> Then wx.TheClipboard.Flush() may cause a memory leak problem? Is it
> possible to avoid this? What about Notepad and other applications? Do
> they all handle clipboard stuff this way?

Yes, I think so. Some programs will warn you on shutdown that they have
put a large amount of data on the clipboard and ask if you want to keep
it there. (Paint Shop Pro does this, and I think I've seen others too.)

Reply all
Reply to author
Forward
0 new messages