home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!caen!uvaarpa!maxwell!mha
- From: mha@Virginia.EDU ("Marty Altschul")
- Subject: Re: Help on CLIPPER DBEDIT()
- Message-ID: <1993Jan8.123925.15908@Virginia.EDU>
- Organization: University of Virginia
- References: <1993Jan4.163531.6968@almserv.uucp>
- Date: Fri, 8 Jan 1993 12:39:25 GMT
- Lines: 38
-
- It is not an easy concept to get but the way to do a get within
- a tbrowse object is as follows:
-
- create your column object as follows:
-
- tc:=tbColumnNew('Heading', {| dummy_var | IIF( PCOUNT() > 0, ;
- real_var := dummy_var,;
- real_var ) } )
- tb:addColumn( tc )
-
- You will also need to create a keystroke handling function
- something like the following:
-
- FUNCTION tbrowse( tb )
- LOCAL lk, browseExit := .F.
- DO WHILE !browseExit
- lk := INKEY(0)
- IF lk == K_ESC
- browseExit := .F.
- ELSEIF lk == K_UP
- tb:up() // same for all navigation keys
- ELSEIF lk == K_ENTER .OR. ( lk > 32 .AND. lk < 128
- IF lk <> K_ENTER
- KEYBOARD CHR( lk )
- ENDIF
- @ ROW(), COL() GET tb:colCurrent:block
- READ
- /* I forget the exact syntax here but the idea is to do a
- normal @ GET and then an EVAL with the returned variable
- so that the code block sees this as a different
- instance than the ordinary screen write where there is
- no parameter.
- */
-
- ENDIF
- ENDDO
-
- I hope this helps somewhat
-