Results 1 to 3 of 3

Thread: Direct_input clipboard crashes when clipboard is empty

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Zeist, Netherlands

    Default Direct_input clipboard crashes when clipboard is empty

    Don't know if it's new for DF2023 but does not happen in DF19.1

    Direct_Input "Clipboard:"
     If (not (SeqEof)) Readln sValue
    Complete reproduction:
        Object oButton1 is a Button
            Set Location to 23 5
            Set Label to 'ClipBoard'
            // fires when the button is clicked
            Procedure OnClick
                String sValue
                Direct_Output 'ClipBoard:'
                Write ''
                Direct_Input 'ClipBoard:'
                If (not (SeqEof)) Readln sValue
                Showln sValue

    does always crash the application when the clipboard is empty. Empty means really empty (not a single space, but completely empty).

    Correction readln svalue is needed to get the crash....

    Correction (again). It is not very simple to reproduce, because clearing the clipboard is not very easy. The above code does not clear the clipboard in Windows 11 (my test environment). If you are using Windows 11, hit "windows + V" and then clear the clipboard.

    Regards, IJmert
    Last edited by IJmert; 8-Aug-2023 at 08:12 AM.
    I you create laws that are only interpretable by computers you get ruled by a computer...!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts