FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Paste in a GET MEMO
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Paste in a GET MEMO
Posted: Tue Aug 28, 2012 09:25 AM

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

Marco Boschi
info@marcoboschi.it
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 01:45 PM
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 :-)

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 02:24 PM

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

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 02:25 PM
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 (fw): Select all Collapse
#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
Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 02:27 PM

Many thanks to Euclides too
we posted at the exact same time :D :roll:

Marco Boschi
info@marcoboschi.it
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 02:30 PM

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:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 02:48 PM

Uwe, you cannot even type in it... :(

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 02:57 PM

The limit is 30000!

Marco Boschi
info@marcoboschi.it
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 05:16 PM

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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 05:27 PM
Put

Code (fw): Select all Collapse
oGet:LimitText()


right after

Code (fw): Select all Collapse
@ 3 , 1 GET oGet VAR cGet SIZE 400 , 400 MEMO OF oWnd


EMG
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
Re: Paste in a GET MEMO
Posted: Tue Aug 28, 2012 07:07 PM

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

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Paste in a GET MEMO
Posted: Wed Aug 29, 2012 06:26 AM

Enrico,
strange the name of this method.
Exactly the opposite of what it does.
No parameters?
Anyway thank you very much.

Marco Boschi
info@marcoboschi.it
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
Re: Paste in a GET MEMO
Posted: Wed Aug 29, 2012 12:38 PM

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)

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Paste in a GET MEMO
Posted: Thu Aug 30, 2012 07:26 AM
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
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Paste in a GET MEMO
Posted: Thu Aug 30, 2012 08:13 AM

8)

Marco Boschi
info@marcoboschi.it

Continue the discussion