[futurebasic] Re: Opening nested fileds

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 1998 : Group Archive : Group : All Groups

From: "L. Frank Turovich" <turovich@...>
Date: Tue, 4 Aug 1998 12:50:07 -0500
>I have two questions that I have played around with, with no success:
>
>1. I can open a file in the folder where the application resides but how
>do you open a file in a folder which is within another folder ?
>

Use the colon to specify a pathname like this: "subfolder:filename"

>and
>
>2. the following code works just fine until my program gets complicated
>and then it does not show the edit field nor the inserted text unless I
>physically refresh the screen by clicking outside of the window and back,
>etc so does anynone know how to get the inserted text to display?
>
>fieldID%=1: startPos%=36000: endPos%=36000
>teH& = TEHANDLE(fieldID%) 'get field handle
>FOR count = 1 TO 6
>strPtr& = VARPTR(var$(count))
>LONG IF teH& 'is handle valid, then continue
>strLen% = PEEK(strPtr&) 'get string length for insertion
>CALL TESETSELECT (startPos%, endPos%, teH&)'set selection in field
>CALL TEINSERT (strPtr& + 1, strLen%, teH&) 'insert text into field
>CALL INVALRECT (teH&..viewRect%) 'force fb to update field
>END IF
>NEXT count
>
>TIA, Stephen

It looks to me like the update can't happen because the program isn't
getting back to your main loop where HANDLEEVENTS can refresh the window.
As long as you are in the loop, nothing else can happen. Once you leave the
field loop, make sure to cycle through your main loop so HANDLEEVENTS can
do its work.


_______________________________________________________________
L. Frank Turovich                        turovich@...
Sentient Fruit              http://home.earthlink.net/~turovich