1. Does clipboard have a limit?

I was testing clipboard with wxEuphoria. It was supposed to copy about 72 lines
of data. But Gedit pasted only about half of that. I figured maybe that's a Gedit
type of thing. I dunno. But Google pasted the same amount of data, about half of
what was supposed to be copied. So now I'm thinking maybe it's a clipboard kind
of thing.

Is there a limit to the amount of data that clipboard can copy?

new topic     » topic index » view message » categorize

2. Re: Does clipboard have a limit?

Jerry Story wrote:
> 
> I was testing clipboard with wxEuphoria. It was supposed to copy
> about 72 lines of data. But Gedit pasted only about half of that.
> I figured maybe that's a Gedit type of thing. I dunno.
> But Google pasted the same amount of data, about half of what was
> supposed to be copied. So now I'm thinking maybe it's a clipboard
> kind of thing.

Maybe I should say Mozilla, not Google. Mozilla is the program on my computer.
Google is the search engine.
 
> Is there a limit to the amount of data that clipboard can copy?

new topic     » goto parent     » topic index » view message » categorize

3. Re: Does clipboard have a limit?

On Tue, 09 Aug 2005 15:20:23 -0700, Jerry Story
<guest at RapidEuphoria.com> wrote:

>Is there a limit to the amount of data that clipboard can copy?
<aside>
Just last week I fixed a bug in Edita whereby it was using an internal
100K buffer and overflowing
</aside>
I can copy the whole of win32lib (1MB, 35,000 lines) to the clipboard
(under Windows) no problem.

I can't claim I know anything about wxEu or the Linux clipboard tho.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

4. Re: Does clipboard have a limit?

Jerry Story wrote:
> Is there a limit to the amount of data that clipboard can copy?

The code that I am using is:
if platform() = WIN32 then
  set_clip_text(clip_str) 
else
  set_text( txtClip, clip_str )
  select_all_text( txtClip )
  copy_text( txtClip )
  set_text( txtClip,"" )
end if


txtClip is a wxTextCtrl
Maybe there is a limit to how much data a wxTextCtrl can have.
Yeah? No?
I dunno.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Does clipboard have a limit?

Hello there,


Just to note, if you use COM's interfaces to interface to the Clipboard
you mainly store a pointer, not the data, so it's possible to quickly
store a whole bunch of data to the clip and it doesnt go anywhere until
a 'receiving' app requests it.
For a working demo see "Demo_04-Clipboard.exw" included with my
WinClass library.  This demo uses the IDataObject interface.


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » goto parent     » topic index » view message » categorize

6. Re: Does clipboard have a limit?

Jerry Story wrote:
> 
> Jerry Story wrote:
> > Is there a limit to the amount of data that clipboard can copy?
> 
> The code that I am using is:
> }}}
<eucode>
> if platform() = WIN32 then
>   set_clip_text(clip_str) 
> else
>   set_text( txtClip, clip_str )
>   select_all_text( txtClip )
>   copy_text( txtClip )
>   set_text( txtClip,"" )
> end if
> <font color="#330033"></eucode>
{{{
</font>
> 
> txtClip is a wxTextCtrl
> Maybe there is a limit to how much data a wxTextCtrl can have.
> Yeah? No?
> I dunno.
> 

It seems that there is a limit of 2047 in a single line wxTextCtrl under
GTK.  If you add the wxTE_MULTILINE style to txtClip, it should work.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

7. Re: Does clipboard have a limit?

Matt Lewis wrote:
> 
> Jerry Story wrote:
> > 
> > Jerry Story wrote:
> > > Is there a limit to the amount of data that clipboard can copy?
> > 
> > The code that I am using is:

> > if platform() = WIN32 then
> >   set_clip_text(clip_str) 
> > else
> >   set_text( txtClip, clip_str )
> >   select_all_text( txtClip )
> >   copy_text( txtClip )
> >   set_text( txtClip,"" )
> > end if
 
> > txtClip is a wxTextCtrl
> > Maybe there is a limit to how much data a wxTextCtrl can have.
> > Yeah? No?
> > I dunno.
> > 
> 
> It seems that there is a limit of 2047 in a single line wxTextCtrl under
> GTK.  If you add the wxTE_MULTILINE style to txtClip, it should work.
> 
> Matt Lewis

I tried:
txtClip = create(wxTextCtrl,{Win,0,"",-1,-1,-1,-1,wxTE_MULTILINE})

Doesn't do anything.

When I replace the wxTE_MULTLINE with 0, it works as before, about half of the
data.

I tried a sequence:  {wxTE_MULTILINE} instead of wxTE_MULTILINE
Then I got an error message. It has to be an atom.

I counted the position. It is the 8th arg, both in my code and in the docs.

How can I get this to work?

new topic     » goto parent     » topic index » view message » categorize

8. Re: Does clipboard have a limit?

Jerry Story wrote:
> 
> I tried:
> txtClip = create(wxTextCtrl,{Win,0,"",-1,-1,-1,-1,wxTE_MULTILINE})
> 
> Doesn't do anything.
> 
> When I replace the wxTE_MULTLINE with 0, it works as before, about half of the
> data.
> 
> I tried a sequence:  {wxTE_MULTILINE} instead of wxTE_MULTILINE
> Then I got an error message. It has to be an atom.
> 
> I counted the position. It is the 8th arg, both in my code and in the docs.
> 
> How can I get this to work?
> 

I'm not sure why it's failing.  Here is the code I used to test:

-- clip.exu
-- created by wxIDE
without warning
include wxEuphoria.e
include wxText.e
include wxButton.e
include wxData.e

global constant
CopyTest = create( wxFrame, {0, -1, "Copy Test", 0, 0, 500, 400 }),
text1 = create( wxTextCtrl, {CopyTest, -1, "new_wxTextCtrl_1", 5, 27, 490, 50,
wxTE_MULTILINE }),
TxtCopy = create( wxButton, {CopyTest, -1, "Text Copy", 10, 195 }),
text2 = create( wxTextCtrl, {CopyTest, -1, "new_wxTextCtrl_2", 5, 130, 490, 50,
wxTE_MULTILINE}),
ClipCopy = create( wxButton, {CopyTest, -1, "Clip Copy", 10, 228 })

sequence test
constant len = 3000

test = ""
for i = 1 to len do
	test &= '0' + remainder( i, 10 )
end for
test &= '-' & sprint(len)
set_text( text1, test )
procedure clip( atom this, atom event_type, atom id, atom event )
	sequence text
	text = get_text_value( text1 )
	set_clip_text( text )
	set_text( text2, get_clip_text(  ) )
end procedure
set_event_handler( ClipCopy, -1, wxEVT_COMMAND_BUTTON_CLICKED,
routine_id("clip"))

procedure text( atom this, atom event_type, atom id, atom event )
	sequence text
	select_all_text( text1 )
	copy_text( text1 )
	set_text( text2, "" )
	paste_text( text2 )
end procedure
set_event_handler( TxtCopy, -1, wxEVT_COMMAND_BUTTON_CLICKED,
routine_id("text"))
wxMain( CopyTest )
-- end clip.exu


Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

9. Re: Does clipboard have a limit?

Jerry Story wrote:
> 
> Matt Lewis wrote:
> > It seems that there is a limit of 2047 in a single line wxTextCtrl under
> > GTK.  If you add the wxTE_MULTILINE style to txtClip, it should work.
> > 
> > Matt Lewis
> 
> I tried:
> txtClip = create(wxTextCtrl,{Win,0,"",-1,-1,-1,-1,wxTE_MULTILINE})
> 
> Doesn't do anything.
> 
> When I replace the wxTE_MULTLINE with 0, it works as before, about half of the
> data.
> 
> I tried a sequence:  {wxTE_MULTILINE} instead of wxTE_MULTILINE
> Then I got an error message. It has to be an atom.
> 
> I counted the position. It is the 8th arg, both in my code and in the docs.
> 
> How can I get this to work?

I found a solution.

I had:
show_window(txtClip,0)

When I commented out this line, it worked.

txtClip was hidden because it's used only for clipboard, nothing else.
Now it makes a very small line in the upper left corner. I guess that's okay.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu