New topic: 

"Retry" Button generates runtime error, crashes debugger

<http://forums.realsoftware.com/viewtopic.php?t=30453>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       charonn0           Post subject: "Retry" Button generates runtime 
error, crashes debuggerPosted: Tue Oct 13, 2009 4:33 am                        
Joined: Mon Apr 02, 2007 2:08 am
Posts: 55              In the app I'm writing at the moment it the user 
attempts to take an action on a file that doesn't exist or they don't have 
permission to access (folderitem.exists and folderitem.isreadable) then I throw 
up an error message:



Pretty standard. The code that invokes the messagebox is:
Code:sub initiate(theFile as folderitem)
  dim theMessage As Integer
  if theFile.Exists =False then
  theMessage = MsgBox("File Does Not Exist", 21, "File Not Found")
  if theMessage = 4 then
  initiate(theFile)
  else
  self.Close
  end if
  else
  if theFile.IsReadable then
  //stuff gets done to theFile
  else
  theMessage = MsgBox("File Is Not Readable." + EndOfLine + "You May Not Have 
Permission To Access This File.", 21, "Read Error")
  if theMessage = 4 then
    initiate(theFile)
  else
    self.Close
  end if
  end if
  end if



According to the Language reference, the integer value of "21" will make the 
messagebox have a stop icon and the Retry and Cancel buttons. If the user 
clicks "Retry" then the integer returned is "4".

However, when I run the program in the debugger and click the "Retry" button, I 
get a nice Window that asks me to report the error to Real Software (I have.)

When the program is run outside the debugger and the Retry button is pressed, I 
get this:


If I then click the "OK" button, the program then acts like nothing happened 
and executes the code that it should when the Retry button is clicked.

Are there any workarounds for this screw up?

Using RealBasic 2009R3 Studio on Windows XP   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to