none
Bug: Program.End() doesn't execute

    General discussion


  • Input:
    TextWindow.Show()
    TextWindow.Write ("What keywords should I show pics for: ")
      word = TextWindow.Read()
    TextWindow.Hide()
    GraphicsWindow.Show()

    Start:
    pic = Flickr.GetRandomPicture(word)
    GraphicsWindow.Width = 800
    GraphicsWindow.Height = 600
    GraphicsWindow.DrawResizedImage(pic,0,0,800,600)
    Program.Delay(5000)
    If (GraphicsWindow.LastKey = "W" ) Then
      Goto Input
    EndIf
    If (GraphicsWindow.LastKey = "S" ) Then
      Desktop.SetWallPaper(pic) 'This executes
      Program.End() 'This appears to shut down GraphicsWindow but does NOT end Execution
    EndIf
    If (GraphicsWindow.LastKey <> "Q") Then 'Because this is True
      Goto Start 'This apparently executes, only now 'word' is not a valid string....
    EndIf
    Program.End()
    ---------------

    There's the source code I'm using.  When I hit S, the Desktop.SetWallpaper(pic) executes and GraphicsWindow goes away.  TextWindow doesn't come back, but Program.End() doesn't execute completely.  The program stays in memory and loads empty pictures from Flickr and then continues to set them as my wallpaper.

    A workaround that works is to put:

    Goto End
    EndIf
    .....If <> "Q", etc..
    .....
    .....EndIf
    End:
    Program.End()
    Monday, November 10, 2008 3:10 AM

All replies

  • Any ideas on this? V?
    Tuesday, November 11, 2008 5:57 PM
  • Thanks for catching and reporting this, Richard.  I'm able to repro this and It appears like a bug in the Application thread's dispatcher.  I've taken note of it and we'll fix this for the next release.
    Tuesday, November 11, 2008 6:22 PM