Skip to content

Commit

Permalink
Fix handling run parameters - queue it!
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Oct 27, 2018
1 parent d0f82e7 commit 4130d1f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Projects/Simba/simbaunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ TSimbaForm = class(TForm)
procedure SaveFormSettings;
procedure AddRecentFile(const filename : string);
procedure InitializeTMThread(out Thread : TMMLScriptThread);
procedure HandleParameters;
procedure HandleParameters(Data: PtrInt);
procedure HandleSettingsParameter;
procedure OnSaveScript(const Filename : string);
property ShowParamHintAuto : boolean read GetShowParamHintAuto write SetShowParamHintAuto;
Expand Down Expand Up @@ -1527,7 +1527,7 @@ procedure TSimbaForm.HandleSettingsParameter;
mDebugLn('ERROR IN COMMAND LINE ARGS: ' + ErrorMsg)
end;

procedure TSimbaForm.HandleParameters;
procedure TSimbaForm.HandleParameters(Data: PtrInt);
var
DoRun : Boolean;
ErrorMsg : string;
Expand Down Expand Up @@ -2339,6 +2339,7 @@ procedure TSimbaForm.FormCreate(Sender: TObject);
Application.OnException := @CustomExceptionHandler;
Application.QueueAsyncCall(@RefreshTabSender, 0);
Application.QueueAsyncCall(@CheckUpdates, 0);
Application.QueueAsyncCall(@HandleParameters, 0);

AddHandlerFirstShow(@FirstShow);

Expand Down Expand Up @@ -2453,8 +2454,6 @@ procedure TSimbaForm.FormCreate(Sender: TObject);
Start();
end;

Application.ProcessMessages(); // Make sure everything is ready for a script run instantly (via parameters).
HandleParameters();
UpdateTitle();
finally
EndFormUpdate();
Expand Down

0 comments on commit 4130d1f

Please sign in to comment.