[futurebasic] Re: [FB] Edit Fields, Strings

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: Sean -G3- <mclaughlin@...>
Date: Thu, 20 May 99 17:28:49 -0400
>>I am trying to add text to an edit field.
>>Normally, I do this:
>>temp$ = EDIT$(1) + theText$
>>EDIT$(1) = temp$
>>I do this because the following code is invalid:
>>EDIT$(1) = EDIT$(1) + theText$
>>But in doing the mentioned code, edit fields cannot exceed the length of 
>>a string (256 characters). What can I do to get around this?
>TEKEY$ = theText$
>will put theText$ into the active edit field at the insertion point.

Thanks, Al. One more related question. I also want to get around the 256 
character limit in a communications environment. The communication 
package I am using works like this:
-You call a function, and pass a string variable.
-The function gets a pointer to the string variable, and sends the 
pointer to another function.
-That function sends the data to a TCP/IP stream.

Because the first function accepts a string, it limits the length to 256 
characters. I want to build up more than 256 characters, get a pointer to 
the block of string data, and send it directly to the function which 
accepts a pointer. How is this done?

Ted's Long Strings builds up a block of string data, and works. However, 
it returns only one character at a time, I need a pointer to the whole 
block of string data.
(Look at line 4 of the code below, from Ted's long strings)

  tagByte% = FN HGETSTATE(gStringH&)'get state of handle
  osErr% = FN HLOCK(gStringH&)'lock handle
  addr& = [gStringH&] + offSet% + 2'get the address for the btye requested
  result% = PEEK(addr&)     'get the byte value from the address
  osErr% = FN HSETSTATE(gStringH&,tagByte%)'return the state of the handle

The function returns result%. I need a function which accepts characters, 
builds up the data, and when I want, can give me a pointer to the entire 
block of data. Then I'll send that pointer to the TCP/IP function. I am 
not yet good at memory/peek/handle/pointer type of things.