Loading ...
Sorry, an error occurred while loading the content.

Keep getting error message. What does it mean and how can i fix it?

Expand Messages
  • potters28
    The error message is #main These handles closed by Liberty BASIC. Please add the appropriate CLOSE commands. What does that mean and how can i fix it?
    Message 1 of 2 , Mar 31, 2005
    • 0 Attachment
      The error message is "#main These handles closed by Liberty BASIC.
      Please add the appropriate CLOSE commands." What does that mean and
      how can i fix it?

      Thanks
    • Dave B.
      In your end routine [quit] you need to have a close statement. You also need a trapclose statement for you #main window #main trapclose [quit] [quit] close
      Message 2 of 2 , Mar 31, 2005
      • 0 Attachment
        In your end routine [quit] you need to have a close statement. You also need a trapclose statement for you #main window

        #main "trapclose [quit]"

        [quit]

        close #main
        end

        LB will close them if you forget to, but it will give you a message that it is about to close them. I the new ON ERROR GOTO statement. If there is an error I send the program to this section:


        [errorHandler]
        msg$ = "Unexpected ERROR ["+str$(Err)+"] "+chr$(13)+Err$+" "
        result = mb("- What did YOU do?!!!! -",msg$, 0, 3)
        if Errclose1$ <> "" then close #Errclose1$
        if Errclose2$ <> "" then close #Errclose2$
        if Errclose3$ <> "" then close #Errclose3$
        if main = True then [quit]
        end

        This will end the program cleanly if there is an error I didn't expect (and therefore don't have a fix for). The Errclose$ variables contain handles for open files. The "main" tells me that the #main dialog is open and needs to be closed. You simply include this line after your window open line.

        main = True

        Hope that helps.

        -- DB


        On Fri, 01 Apr 2005 03:30:53 -0000
        "potters28" <potters28@...> wrote:

        >
        >
        > The error message is "#main These handles closed by Liberty BASIC.
        > Please add the appropriate CLOSE commands." What does that mean and
        > how can i fix it?
        >
        > Thanks
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.