GENREADER() Short: ------ GENREADER() Creates specialized user defined get reader block Returns: -------- <bReader> => get reader block for GET Syntax: ------- GENREADER(bBlock,lPass) Description: ------------ Creates a get reader block that first passes control to code block <bBlock> for each keypress. <bBlock> is passed the following values: 1. lastkey() value 2. proc name 3. var name 4. current get value If <bBlock> returns any value but a Nil, the get is assigned this value. If a Nil is returned, and <lPass> is True, then the key is passed to the regular get handler. Implement by using the SEND keyword for your @Say..Get.. statements. @10,10 say blah get blahblah SEND reader:=GENREADER(bBlock,lPass) Or simply refer to the last get added with ATAIL(getlist) @10,10 say blah get blahlblah ATAIL(getlist):reader := GENREADER(bBlock,lPass) Examples: --------- // while in the get V1, you will be able to type 1, 2 or 3 // to get a value from the array aValues := {"Section 1","Section 2","Section 3"} bBlock := ; { | k| iif( (nAtk:=at(chr(k),"123")) > 0,aValues[nAtk],nil) } v1 := "Section 1" @10,10 get v1 send reader := genreader(bBlock) READ Source: ------- S_READRS.PRG
Pingback: SP Get system Functions | Viva Clipper !
Pingback: SP Functions | Viva Clipper !