Model stack that doesn't Stop Messages

Derek Bump webmaster at dreamscapesoftware.com
Thu Aug 5 17:45:50 CDT 2004


I've got a mainstack that when it loads the "openStack" handler, it modals a substack that downloads a few files from a web server.  When it's done downloading it is to close and the main stack then continues with it's operations.

I'm experiencing a wonderful little issue now where the stack models, but the mainstack continues it's handlers and does not wait for the model'd stack to finish it's own operations.  So then I just get nothing but errors.  On top of that, the model'd stack is executing the "preOpenStack" and "openStack" handlers from the mainstack instead of it's own.

Any ideas on what's going on?  Here's the mainstack's script...

on preOpenStack
  put "ftp://****:****@ftp.valuworld.com/www/htdocs/supermallsystem/" into ftpAddress
  put queryRegistry("HKEY_CURRENT_USER\Software\ValuLine Online\Customer Manager\ScreenRect") into newRect
  if newRect is not empty then set the rect of this stack to newRect
end preOpenStack

on openStack
  set cursor to watch
  -- Perform Downloading Operations
  set the dialogData to "downloadAccountAgent"
  modal stack "wsmTransferAgent"
  put the dialogData into theResult
  if theResult is not empty then
    put warnAsk("Error","An error occured while attempting to download the Accounts and Agents data.") into errorResult
  end if
  -- Perform Screen Update Operations
  showAgents
  showAccounts
end openStack


And here's the modeled sub-stack's script...

on preOpenStack
  set the thumbPosition of scrollbar "progress1" to 0
  set the thumbPosition of scrollbar "progress2" to 0
  put empty into cd fld "status1"
  put empty into cd fld "status2"
  put the dialogData into theAction
end preOpenStack

on openStack
  if theAction is "downloadAccountAgent" then
    downloadAccountAgent
  else if theAction is "uploadAccountAgent" then
    uploadAccountAgent
  end if
end openStack

 

Derek Bump
Dreamscape Software
____________________________________________
Compress Images Easily with JPEGCompress
http://www.dreamscapesoftware.com
 


More information about the use-livecode mailing list