home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION MEMOGET
- *****************************************************************
-
- * Initiates data entry in a memo through a trigger variable
-
- * Copyright(c) 1991 - James Occhiogrosso
-
- LOCAL old_col, old_row, old_screen, trigger
-
- PARAMETERS format, memo_name, top, left, bottom, right, update, ;
- userfunc, line_len, tab_size, start_line, start_col, ;
- init_row, init_col
-
- * The first six arguments are always passed
-
- IF PCOUNT() < 6
- RETURN .F.
-
- ELSE
- * Create defaults for arguments not passed
-
- update = IF(update == NIL, .T., update)
- userfunc = IF(userfunc == NIL, "memoctrl", userfunc)
- line_len = IF(line_len == NIL, (right-left)-1, line_len)
- tab_size = IF(tab_size == NIL, 4, tab_size)
- start_line = IF(start_line == NIL, 1, start_line)
- start_col = IF(start_col == NIL, 0, start_col)
- init_row = IF(init_row == NIL, 0, init_row)
- init_col = IF(init_col == NIL, 0, init_col)
-
- ENDIF
-
-
- * Get name of memo trigger variable
- trigger = READVAR()
-
- * Save GET row and column
- old_row = ROW()
- old_col = COL()
-
- &trigger = IF(EMPTY(&trigger), ' ', UPPER(ALLTRIM(&trigger)))
-
- IF .NOT. &trigger $ 'YN√ '
- * Stay in get if trigger field has wrong value
- RETURN(.F.)
-
- * If trigger is 'Y', edit memo
- ELSEIF &trigger = 'Y'
-
- * If AED menubar is in use, put a message in its window
- AEDMSG('mw_memo')
-
- * Edit memo by reference
- MEMOVIEW(format, @memo_name, top, left, bottom, right, ;
- update, userfunc, line_len, tab_size, ;
- start_line, start_col, init_row, init_col )
-
- AEDMSG('mw_pgdn')
-
- * Replace trigger variable with a "check" character,
- * and display it to indicate memo has data
-
- &trigger = IF(EMPTY(memo_name), 'N', CHR(251))
- @ old_row, old_col SAY &trigger
-
- ENDIF
-
- RETURN(.T.)
-
-