HTTP.Download() in silent mode generates errors.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • tigran
    Forum Member
    • Apr 2007
    • 57

    HTTP.Download() in silent mode generates errors.

    I can't figure out how to avoid errors in my log file which are generated by the HTTP.Download() function if it's run in a silent mode. When the function is run in a silent mode, i don't pass CallbackFunction parameter (nil value), but it still generates the following errors:

    [01/31/2008 17:14:30] Error Script: On Pre Install, Line 2593 (1406)
    [01/31/2008 17:14:30] Error Script: On Pre Install, Line 2593 (1402)
    [01/31/2008 17:14:30] Error Script: On Pre Install, Line 2593 (1405)
    [01/31/2008 17:14:30] Error Script: On Pre Install, Line 2593 (1404)

    All 4 errors are dialog-related where download info can not be displayed in a dialog. Here is my function call in a silent mode:

    HTTP.Download(szFileSource, szFileDest, MODE_BINARY, gHTTPTimeout, gHTTPPort, nil, nil, nil);

    Why those errors are generated even though CallbackFunction is nil? The download itself works fine.
  • Adam
    Indigo Rose Staff Member
    • May 2000
    • 2149

    #2
    Do you have any StatusDialog.* actions near the download call? If so that could be the reason since the software passes these to the status dialog, if it is enabled and the callback is nil.

    Adam Kapilik

    Comment

    • tigran
      Forum Member
      • Apr 2007
      • 57

      #3
      Thanks for reply Adam. I do, in fact, have status dialog calls near download call. Below is an excerpt from my function:

      ---------------------------------------
      if bSilent then

      HTTP.Download(szFileSource, szFileDest, MODE_BINARY, gHTTPTimeout, gHTTPPort, nil, nil, nil);

      else

      StatusDlg.Show();
      StatusDlg.ShowProgressMeter(true);
      StatusDlg.SetAutoSize(true);
      StatusDlg.ShowCancelButton(bAllowCancel, "Cancel");
      StatusDlg.SetTitle(szDialogTitle);
      StatusDlg.SetMeterRange(0, 65534);

      HTTP.Download(szFileSource, szFileDest, MODE_BINARY, gHTTPTimeout, gHTTPPort, nil, nil, gDownloadCallback);

      StatusDlg.Hide();

      end
      ---------------------------------------

      What has to be changed in the function to prevent the errors when downloading in silent mode?
      Last edited by tigran; 02-04-2008, 08:15 AM.

      Comment

      Working...
      X