when Beep plays

  1. 2 weeks ago

    I put some Beep calls into some code with delays, hoping to be able to know when certain events were occurring.
    But it seems as if the Beeps do not take effect until control is passed back to the system. That is, I don't hear the Beeps until the function that calls Beep is exited (or something like that).
    Is this correct?

    TIA

  2. Gavin S

    Jan 8 Pre-Release Testers, Xojo Pro, Forum Moderators, MVP UK

    Hard to say without seeing the code, but quite possible.

    But forget Beeps. Two better options:
    1. Log to the Messages pane at the bottom, using System.DebugLog(). Put the following in each event that you want to check.

    System.DebugLog("Current event: " + CurrentMethodName)

    2. Set breakpoints in the events. Breakpoints are the little red flags in the gutter, in the code editor. Project menu > Breakpoint > Turn On

  3. Thanks Gavin, I haven't tried the DebugLog messages, that looks to be really useful.

    I believe I've answered my question. I got fooled by a mysterious 24 second delay which I then traced down. That delay made it seem like the beeps were happening at the end the process that followed...which coincidentally would normally take about 20 seconds.

    In any case, it seems the beeps play when Beep is called.

or Sign Up to reply!