forum-msg-id-135104-edit
Original date:2020-10-07 14:50:42 Edited by: Senator Subject: Re: Budget Builder - Euphoria display bug?
-- register.e part 2, edit 2 public procedure display_full_note(integer rec=0, integer truncate = 1) integer HLITE, line atom val, bal object data, key, pos sequence display_key, note, display_amt, display_bal init_text_formatter() reset_columns() set_foreground_color(FGC) if rec=0 then rec=prompt_number("\n\nEnter number of record to display #: ",{1,db_table_size()}) truncate = 0 else truncate = 1 end if key = db_record_key(rec) data = db_record_data(rec) note = data[1] val = data[2] bal = balance(rec) if val <0 then val = -val HLITE = RED else HLITE = FGC end if display_amt = text:format("$ [:8,,.2]",val) display_bal = text:format("$ [:8,,.2]",bal) puts(1, "\n") --<-------this produces serious unacceptable display errors, produces debug.log puts(1, "\n\n") --<-------this significant display errors. Does not produce a debug.log pos = get_position() line = pos[1] -- display record position(line,1) printf(1,"%d", rec) -- display("[]",rec,0) -- works same as printf -- display key position(line,key_col) if truncate = 0 then display_key = text:format("[]-[]-[]-[]:[]:[]",{key[YEAR],key[MONTH],key[DAY],key[HOUR],key[SECOND]}) elsif equal(current_table, RESERVE) then display_key = text:format("[]-[]-[]",{key[YEAR],key[MONTH]}) elsif equal(current_table, BUDGET) then display_key = text:format("[]-[]",{key[1]}) -- DAY-HOUR in budget key else -- REGISTER/CASH display_key = text:format("[]-[]",{key[MONTH],key[DAY]}) end if hilite(display_key,HLC,0) -- display note position(line, note_col) if truncate then truncate_note(note, 35) else position(line+1, note_col) set_margins(note_col, amt_col-2) print_formatted(note) end if -- display transaction amt position(line,amt_col) hilite(display_amt,HLITE,0) -- display balance position(line, bal_col) display(display_bal,{},0) init_text_formatter() set_foreground_color(FGC) end procedure
Using "\n" display through 20 OK. Records 25-93 are not display. No problem with *.edb is fine. debug.log file
# Day Transaction Amount Balance ----------------------------------------------------------------------------------- 1 7-3 Deposit SSA $ 1,505.00 $ 5,306.03 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 20 7-21 AMAZON household Veken Bidet & toil~ $ 45.83 $ 2,882.72 94 10-31 autolog SC Balance Requirement Feel~ $ 5.00 $ 3,211.7Using "\n\n" Displays initial 9 records with an extra "\n. Balance of records displayed as expected.
- .edb OK No debug log.
# Day Transaction Amount Balance ----------------------------------------------------------------------------------- 1 7-1 balance $ 3,801.03 $ 3,801.03 2 7-3 Deposit SSA $ 1,505.00 $ 5,306.03 --------------------------------------------------------------------------------- 91 10-28 autolog Tabatha Kitchens household $ 250.00 $ 2,366.73 92 10-28 autolog FOOD groceries $ 500.00 $ 1,866.73
Any insight into this problem would be appreciated.
Regards,Ken
Not Categorized, Please Help
|