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

Re: Closing windows while looping

Expand Messages
  • Harry
    And not only was that a perfect solution for closing a loop, but solving that allowed me to isolate and cure the source of the ugly crash and burn the
    Message 1 of 7 , Mar 14, 2013
    • 0 Attachment
      And not only was that a perfect solution for closing a loop, but solving that allowed me to isolate and cure the source of the ugly crash and burn the application was experiencing. Thanks again!

      --- In libertybasic@yahoogroups.com, "Lorne Russell" <lorneokb@...> wrote:
      >
      > Put a scan command in the loop
      >
      > Lorne Russell
      >
      >
      > From: Harry
      > Sent: Wednesday, March 13, 2013 3:34 PM
      > To: libertybasic@yahoogroups.com
      > Subject: [libertybasic] Closing windows while looping
      >
      >
      > Okay. I give up.
      >
      > Apparently clicking the X button (or pressing Alt-F4) while in a loop will not exit a program until the loop finishes. I've tried it with every kind of loop I could thing of. (See code below.)
      >
      > Directing - or in the project I'm working on, redirecting - trapclose to someplace else, whether to a labeled branch, subroutine, or gosub, doesn't do anything, except in some cases causing a major error on exit, locking up Win7, and shuttinng off all the power in the city. (Okay, maybe not the shutting power thing.)
      >
      > I've also tried creating my own stop the loop button to - what else? - stop the loop and exit, to no avail.
      >
      > Any wisdom would be appreciated.
      >
      > Harry
      >
      > CODE ---------------------------------------------------
      > UpperLeftX = 1
      > UpperLeftY = 1
      > open "test" for window as #t
      > i = 0
      > ' for i = 1 to 1000
      > ' print i
      > ' next i
      > ' while i < 1000
      > ' i = i + 1
      > ' print i
      > ' wend
      > '[loop]
      > ' i = i + 1
      > ' print i
      > ' if i < 1000 then [loop]
      > 'close #t
      > do
      > i = i + 1
      > print i
      > loop while i < 1000
      > close #t
      > END
      > ----------------------------------------------------------
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
    • Gary Passmore
      Just a thought that occurred to me while doing some memory clearing today. Possibly this has not occurred to everyone, so I ll pass it on.   If you are the
      Message 2 of 7 , Mar 16, 2013
      • 0 Attachment
        Just a thought that occurred to me while doing some memory clearing today. Possibly this has not occurred to everyone, so I'll pass it on.
         
        If you are the kind of careless typist I am, your LB Error.log can grow pretty large. Every few days I bring it up with Notepad (it is Pinned to my Taskbar List), set the cursor to the left of the date (in a line I added which says "Error.log cleared: 'DATE'), press CTRL+SHIFT+END, then F5, then CTRL+S, and ALT+F4. The log is cleared, and date recorded, the file saved and closed.
         
        Similarly, if your LB programs are automatically backed up on RUN, your 'bak' folder will eventually fill with hundreds of now useless and forgettable files. I usually keep only the last couple of months' worth or so.
         
        Gary
        ...from the world according to GaRPMorE   

        [Non-text portions of this message have been removed]
      • Mike Green
        Good tip. I can check the size of of my error.log file thus: (assuming XXX is the username that I use for my computer). open C: Users XXX AppData Roaming +_
        Message 3 of 7 , Mar 18, 2013
        • 0 Attachment
          Good tip.

          I can check the size of of my error.log file thus:
          (assuming XXX is the username that I use for my computer).

          open "C:\Users\XXX\AppData\Roaming\"+_
          "Liberty BASIC v4.04\error.log" for input as #1
          lenFile=lof(#1) :lenFile=int(lenFile/1000)
          close #1
          print lenFile;" KB"
          END




          To: libertybasic@yahoogroups.com
          From: garpmore@...
          Date: Sat, 16 Mar 2013 21:03:58 -0700
          Subject: [libertybasic] Housekeeping


























          Just a thought that occurred to me while doing some memory clearing today. Possibly this has not occurred to everyone, so I'll pass it on.



          If you are the kind of careless typist I am, your LB Error.log can grow pretty large. Every few days I bring it up with Notepad (it is Pinned to my Taskbar List), set the cursor to the left of the date (in a line I added which says "Error.log cleared: 'DATE'), press CTRL+SHIFT+END, then F5, then CTRL+S, and ALT+F4. The log is cleared, and date recorded, the file saved and closed.



          Similarly, if your LB programs are automatically backed up on RUN, your 'bak' folder will eventually fill with hundreds of now useless and forgettable files. I usually keep only the last couple of months' worth or so.



          Gary

          ...from the world according to GaRPMorE



          [Non-text portions of this message have been removed]


















          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.