Paste in a GET MEMO

Paste in a GET MEMO

Postby MarcoBoschi » Tue Aug 28, 2012 9: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
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Paste in a GET MEMO

Postby ukoenig » Tue Aug 28, 2012 1: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 :cry:

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Paste in a GET MEMO

Postby Euclides » Tue Aug 28, 2012 2: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
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: Paste in a GET MEMO

Postby MarcoBoschi » Tue Aug 28, 2012 2: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: 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
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Paste in a GET MEMO

Postby MarcoBoschi » Tue Aug 28, 2012 2:27 pm

Many thanks to Euclides too
we posted at the exact same time :D :roll:
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Paste in a GET MEMO

Postby ukoenig » Tue Aug 28, 2012 2: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Paste in a GET MEMO

Postby Euclides » Tue Aug 28, 2012 2:48 pm

Uwe, you cannot even type in it... :(
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: Paste in a GET MEMO

Postby MarcoBoschi » Tue Aug 28, 2012 2:57 pm

The limit is 30000!
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Paste in a GET MEMO

Postby Rick Lipkin » Tue Aug 28, 2012 5: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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Paste in a GET MEMO

Postby Enrico Maria Giordano » Tue Aug 28, 2012 5:27 pm

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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Paste in a GET MEMO

Postby Euclides » Tue Aug 28, 2012 7: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
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: Paste in a GET MEMO

Postby MarcoBoschi » Wed Aug 29, 2012 6:26 am

Enrico,
strange the name of this method.
Exactly the opposite of what it does.
No parameters?
Anyway thank you very much.
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Paste in a GET MEMO

Postby Euclides » 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)
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: Paste in a GET MEMO

Postby Enrico Maria Giordano » Thu Aug 30, 2012 7: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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Paste in a GET MEMO

Postby MarcoBoschi » Thu Aug 30, 2012 8:13 am

8)
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 89 guests