View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002071 | SkyChart | 1-Software | public | 19-02-03 23:20 | 19-03-03 21:11 |
Reporter | Sasa | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu 64-bit | OS Version | 18.10 |
Product Version | 4.1 SVN | ||||
Summary | 0002071: Printing issue - AV if printer do not exists | ||||
Description | I have implemented as well printing for "Objects list" form while working on VTV and due test I have found an old bug, I believed it was fixed for another icassion... The problem is in unit u_util.pas and procedure PrintStrings. If there is no printer. It will raise an AV instead a message that printer in not available and continue work. | ||||
Tags | No tags attached. | ||||
|
|
|
Fixed by: https://github.com/pchev/skychart/commit/eb63d09926971fb22d214cde50702a9e148027b3 |
|
Unfortunately, this does not solve the problem and AV is present again. I do not have any printer installed, but Printer is not nil. Perhaps to check Printer is not nil and then Printer index? And where printing is not available, to set Enabled property instead Visible, or to show message that printer is not installed, in order to be clear for user. //btnPrint.Visible := (Printer.PrinterIndex >= 0); btnPrint.Enabled := (Printer.PrinterIndex >= 0); |
|
How can you get this error? , I tested in a virtual machine without printer but I cannot reproduce the problem because there is no Print button in this case. This is done in the FormShow event: Button6.Visible := (Printer.PrinterIndex >= 0); Visible or Enabled I am not sure what is the best for a user without printer, it just not care. With enabled:=false I risk to receive bug report "Why is printing not working" |
|
With btnPrint.Enabled := (Printer.PrinterIndex >= 0) button is shown in disabled mode. I personally prefer to let button enabled always and when press it, to show message that printer is not installed - no confusion |
|
OK to use Enabled. I make the change with ButtonPrint.Enabled := (Printer.PrinterIndex >= 0); I also change the test in the print function to ensure Printer.PrinterIndex >= 0 https://github.com/pchev/skychart/commit/d40624b9d832bd2c749d25a383c9ceca0f41b92c |
Date Modified | Username | Field | Change |
---|---|---|---|
19-02-03 23:20 | Sasa | New Issue | |
19-02-03 23:20 | Sasa | File Added: Screenshot from 2019-02-03 23-10-13.png | |
19-02-04 10:50 | Patrick Chevalley | Status | new => resolved |
19-02-04 10:50 | Patrick Chevalley | Resolution | open => fixed |
19-02-04 10:50 | Patrick Chevalley | Note Added: 0005320 | |
19-02-08 12:19 | Sasa | Status | resolved => new |
19-02-08 12:19 | Sasa | Resolution | fixed => reopened |
19-02-08 12:19 | Sasa | Note Added: 0005365 | |
19-02-08 12:19 | Sasa | Note Edited: 0005365 | |
19-02-08 12:22 | Sasa | Note Edited: 0005365 | |
19-02-08 12:55 | Sasa | Note Edited: 0005365 | |
19-02-09 10:46 | Patrick Chevalley | Note Added: 0005373 | |
19-02-09 12:36 | Sasa | Note Added: 0005376 | |
19-03-03 21:11 | Patrick Chevalley | Status | new => resolved |
19-03-03 21:11 | Patrick Chevalley | Resolution | reopened => fixed |
19-03-03 21:11 | Patrick Chevalley | Note Added: 0005451 |