DF busy after multiple system messagebox pop up


dle

Recommended Posts

I have a scenario that require messagebox pop up one after another. Many times DF work fine but sometimes DF is showing busy and won't response  to any command. 

I see on the command showing something like memory is not enough for system messagebox...

my computer using windows 7 64 bit and has 8GB memory. 

What is the suggestion? 

Link to comment
Share on other sites

"Memory" is a loaded term as Windows refers to many things as memory, including something that they often call "resources", which are much more limited.  My guess is that you are popping up a whole bunch of messageboxes stacked on top of each other and using up all the system resources.  Maybe post your document? (or email it to us)

Link to comment
Share on other sites

I was a little wrong from previous post. All the process still running just the busy mouse won't allow to click on any button. The computer process still normal.

I did remove the system messagebox pop up but the problem still persist.

Below is the script in the scan serial function

Function U0_ScanSerial ()
   Private GoodToGo = 0
   Private String Marking = "N"                                   // Marking: N for new serial#, R for repeat serial#
   BeginSeq(S7_ReadScanner)                                       // Begin reading scanner serial sequence
   
   If (!(IsEmpty(Product_Serial)))                                // If a serial number exist            
      Component.ProductSerial_EditBox.strContents = Product_Serial                  // show it with the pop up
   Endif
   
   Page.PoP_BarcodeSerial.PopupModeless(1)                        // pop up the product serial request 

   // Allow until serial number is scanned or entered by user
   While (S7_ReadScanner == 0)
      Delay(.5)
   Endwhile
   
   If (IsEmpty(Product_Serial))
      GoodToGo = 0
   Else
      If (NumRows(Result_SerialNumber) > 1)
         For (Private i = 0, i < NumRows(Result_SerialNumber), i++)
            If (Product_Serial == Result_SerialNumber)
               If (System.MessageBox("This Serial number already processed. Would you like to continue?", "YesNo") == "Yes")
                  Marking = "R" 
                  GoodToGo = 1
                  i = NumRows(Result_SerialNumber) + 1
               Else
                  GoodToGo = 2
                  i = NumRows(Result_SerialNumber) + 1
               Endif
            Else
               GoodToGo = 1
            Endif
         Endfor
      Else
         GoodToGo = 1
      Endif
   Endif
   
   Switch
      Case (GoodToGo == 0)
         Return("NA")
      Case (GoodToGo == 1)
         Return (Marking + Product_Serial)
      Case (GoodToGo == 2)
         Return ("NO")
   Endcase

20161216_113053_resized.jpg

Link to comment
Share on other sites

Function read scanner:

 

Function S7_ReadScanner()
   ReadScannerLoop = 1
   Device.BARCODE_SCANNER.Purge()                              // Clear the receiver buffer
   Private String ReadData = ""
   While(ReadScannerLoop)                                                    
      Try
         ReadData = Device.BARCODE_SCANNER.ReadUntil(13)       // Try to read data from the scanner until a carriage return character is reached
         If (ReadData != "")
            ReadData = Remove(ReadData, Chr(13))               // Remove carriage return character from the string if applicable
            ReadData = Remove(ReadData, Chr(10))               // Remove line feed character from the string if applicable
            DisplayTableData[2] = ReadData                     // Display reading barcode on the Diaplay panel
            Product_Serial = ReadData                          // Saving barcode serial into variable
            Page.PoP_BarcodeSerial.ClosePopup()                // Close the pop up
            break
         Else
            Delay(.2)
         Endif
      Catch()
         Delay(1)
         ErrorIndex += 1
         ErrorType[ErrorIndex] = "Waiting for scanner input..."
      EndCatch
   Endwhile

Link to comment
Share on other sites

Product_Serial is global variable. The S3_autotest sequence will clear the history of Product_Serial variable each time it runs

It will then call the U0_ScanSerial.

If user don't want to proceed, the cancel button will set the ReadScannerLoop in the S7_ReadScanner() to 0 to end the loop and thus, Product_Serial is empty in the U0_ScanSerial and it will return "NA" to the S3_AutoTest to end that sequence as well.

Link to comment
Share on other sites

Sure, but unless S7_ReadScanner is also a variable (in which case you have a different problem) the statement:

While (S7_ReadScanner() == 0)

is going to call the S7_ReadScanner function and leave the loop if that functions returns 0.  But it doesn't return anything.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.