Page 1 of 1

Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 9:25 am
by MarcoBoschi
Hi,
I have this get object
@ 4 , 2 GET oComando VAR cComando SIZE 500 , 650 MEMO
I select all text from notepad.
There are 500 rows of text of about 80 characters each.
I paste into the get object
I find in it only 30000 characters
Is it normal?
Best regards

marco

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 1:45 pm
by ukoenig
Marco,

from Clipper-tutorial :
there is a maximum of 65.535 Characters possible.

I tested inserting a Text with different Editors, it was not complete :cry:

Best Regards
Uwe :lol:

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 2:24 pm
by Euclides
Hi,
I confirm that! I supposed that in (x)Harbour the 64k limitatios was over.
The memo field cannot hold more than 30000 bytes in Harbour or Xharbour.
Maybe is a Fivewin issue???
Regards, Euclides

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 2:25 pm
by MarcoBoschi
Uwe,
Please:
1) run this little sample program
2) select all text in filetocopy.txt files open by notepad
3) copy
4) paste into oGet MEMO GET
5) I find truncated ad 30000 character

Many thanks Again
Marco



Code: Select all  Expand view
#include "fivewin.ch"
#define crlf CHR(13) + CHR(10)
FUNCTION MAIN()
LOCAL oWnd
LOCAL oGet , cGet := ""
LOCAL oCreate
DEFINE WINDOW oWnd

@ 1 , 1 BUTTON oCreate SIZE 60 , 20 ACTION create_txt()

@ 3 , 1 GET oGet VAR cGet SIZE 400 , 400 MEMO OF oWnd

ACTIVATE DIALOG oWnd


RETURN NIL

FUNCTION CREATE_TXT()
LOCAL cString := ""
LOCAL i
FOR i := 1 TO 500

    cString := cString +  "This is the line #" + STR( i ) + " This is the line #" + STR( i ) + "This is the line #" + STR( i ) + crlf

NEXT i

memowrit( "filetocopy.txt" , cString )
? "LEN " , LEN( cString )
shellexecute( 0 , 0 , "filetocopy.txt" , 0 , 0 , 1 )
RETURN NIL
 


At the end of memo I find this
This is the line # 342 This is the line # 342This is the line # 342
This is the line # 343 This is the line # 343This is the line # 343
This is the line # 344 This is the line # 344This is the line # 344
This is the line # 345 This is the line # 345This is the lin

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 2:27 pm
by MarcoBoschi
Many thanks to Euclides too
we posted at the exact same time :D :roll:

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 2:30 pm
by ukoenig
Marco,

I will try, appending in 2 Stepps the text to the Memo 1/2 + 1/2
didtn't test this.

Just tested with the same result : the MEMO doesn't append the next 2. Text.

Best Regards
Uwe :lol:

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 2:48 pm
by Euclides
Uwe, you cannot even type in it... :(

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 2:57 pm
by MarcoBoschi
The limit is 30000!

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 5:16 pm
by Rick Lipkin
Marco

Just curious .. I use ADO and Sql tables with memo or varchar fields .. I have not tested it with that many rows of text. My guess that may be a DBFCDX or DBFNTX rdd limitation ??

Rick Lipkin

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 5:27 pm
by Enrico Maria Giordano
Put

Code: Select all  Expand view
oGet:LimitText()


right after

Code: Select all  Expand view
@ 3 , 1 GET oGet VAR cGet SIZE 400 , 400 MEMO OF oWnd


EMG

Re: Paste in a GET MEMO

PostPosted: Tue Aug 28, 2012 7:07 pm
by Euclides
Yes Enrico, it does the trick. I tested it with a 500K text file.
But have to put it in the ON INIT
Regards,
Euclides

Re: Paste in a GET MEMO

PostPosted: Wed Aug 29, 2012 6:26 am
by MarcoBoschi
Enrico,
strange the name of this method.
Exactly the opposite of what it does.
No parameters?
Anyway thank you very much.

Re: Paste in a GET MEMO

PostPosted: Wed Aug 29, 2012 12:38 pm
by Euclides
Marco,
oMGet:LimitText( nChars ) limits the length of text to nChars and oMGet:LimitText()
without parameters allows edit without any limit.
(from Whatsnew Dec.2009)

Re: Paste in a GET MEMO

PostPosted: Thu Aug 30, 2012 7:26 am
by Enrico Maria Giordano
MarcoBoschi wrote:Enrico,
strange the name of this method.
Exactly the opposite of what it does.


It's a Microsoft name. Please ask Bill for any info. :-)

EMG

Re: Paste in a GET MEMO

PostPosted: Thu Aug 30, 2012 8:13 am
by MarcoBoschi
8)