I used System.Assign and now I have my program working in Lazarus,  I am 
exploring both options of making it a real windows application with Lazarus and 
a console program that can launch save-as.

The Lazarus version is mostly working in Lazarus, but instead of everything 
happening before the form is loaded, is there a way I could make the form 
first, then just start processing everything, so that my messages I send to 
memo1 show up as it's processing?  I'm guessing I need to move my program from 
On-create to somewhere else so it runs after the memo box is showing... but I 
don't know where I would move it to.  Any suggestions?

James  Richters

-----Original Message-----
From: fpc-pascal <fpc-pascal-boun...@lists.freepascal.org> On Behalf Of Luca 
Olivetti
Sent: Saturday, November 3, 2018 6:15 PM
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] Windows programming tutorials for FPC

El 3/11/18 a les 23:04, James ha escrit:
> Thanks for the suggestion...
> 
> I put my code in the OnCreate event as you suggested, but when I try to 
> compile it, I get wrong number of parameters specified for call to Assign... 
> my code worked before, and I have no idea what other parameters it could want 
> or why it would be any different than my console application.
> 
> I'm doing:
> Var
>     TapFileName : AnsiString;
>     TapFile  : Text;
> 
> Assign(TapFile,TapFileName);
> 
> Any ideas why this works in FPC but not in Lazarus?

Because Assign is a method of the form. Use AssignFile or System.Assign.
BTW: what I explained before is *not* how a gui application is usually written 
but it should work in your case.

Bye
--
Luca
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org 
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to