Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Posts
    42

    HTTP action progress

    Hi,

    I am using the HTTP.TestConnection and HTTP.Submit actions to post data to a php script.

    The actions have a timeout setting to wait for a response from the remote server, but is there any way to display to the user visually the status of this wait (if there is one)?

    For example, if my server is down, the HTTP action will try to connect for 20 secs (by default). During that 20 seconds nothing happens in my AMS application -- it appears frozen, and that is a long time for an application to be frozen without so much as even an hourglass cursor. I would like to display to the user the progress of this 20 second wait (should it be necessary) but the status callback function is only available for HTTP.Download.

    I have tried running a page OnTimer event, but even that pauses during the 20 seconds.

    Any suggestions appreciated.

    Thanks, CW

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    What about this. This is from the help guide but is for the HTTP.Download action
    Code:
    connected = HTTP.TestConnection("http://www.indigorose.com", 20, 80, nil, nil);
    
    -- If they are connected.
    if connected then
        -- Download a file to their temporary directory.
        StatusDlg.Show(MB_ICONNONE, false);
        HTTP.Download("http://www.indigorose.com/setup.exe", _TempFolder.."\\setup.exe", MODE_BINARY, 20, 80, nil, nil, nil);
    
        -- Get any error codes that may have been returned by the download action.
        error = Application.GetLastError();
        StatusDlg.Hide();
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  3. #3
    Join Date
    Jun 2002
    Posts
    42
    Thanks Tigg, but unfortunately the same problem would be encountered with the example code.

    If the user wasn't connected (first line of code) it takes the AMS application 20 seconds to tell you, without any status displayed on the screen. It appears to the user that your app has just frozen.

    I know the 20 secs timeout can be lowered, but even at 10 seconds that's a long wait with nothing happening.

    Thanks for the suggestion though.

    CW

  4. #4
    Join Date
    Jun 2002
    Posts
    42
    Thanks, please ignore me.

    I wasn't using the HTTP.TestConnection right. Problem solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts