Re: [fpc-pascal] fptemplate example wrong?

2015-04-18 Thread Luca Olivetti
El 18/04/15 a les 14:16, ABorka ha escrit:
 The OnGetParam and OnReplaceTag are two totally different ways to handle
 templates. The former is the original version found in FPC packages, the
 latter is the newer, more Delphi-like - although enhanced - way to do
 templates. The two are mutually exclusive and controlled by the
 AllowTagParams flag (false - old way,  true - new way).

I saw that, it's clearly indicated in the source

 
 The fptemplate.txt file under the FPC sources,
 .../packages/fcl-base/texts/fptemplate.txt might help a little.

Thank you, I didn't see it. It explains how the new way works, but it
doesn't explain why the old one uses the web module's OnReplaceTag event
instead of the ModuleTemplate's one (or vice versa).

Bye
-- 
Luca

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


Re: [fpc-pascal] fptemplate example wrong?

2015-04-18 Thread Luca Olivetti
El 18/04/15 a les 07:54, leledumbo ha escrit:
 but it didn't work in my program. 
 
 The example works just fine with embedded server, only need to adjust path
 to the template. So you might want to send a minimal example that shows it
 doesn't work as you describe.
 
 It turns out that the correct OnReplaceTag event to assign is the one of 
 the module itself and not of ModuleTemplate, i.e.:
 
 There's on OnReplaceTag in TFPWebModule...
 
 It's very likely that you misunderstood fpWeb application flow.

You are right, the example works, and I'm surprised: I couldn't manage
to make it work in my application (and now I don't know why).
Since I'm not using actions, I thought that might be the problem and
modified my module to use actions just like the example. That didn't
work either (again, now I don't understand why), so I tried with
AllowTagParams:=false and ModuleTemplate.OnGetParam instead.
Since that didn't work either, I traced it and it turns out that what I
said in my original email applies only to OnGetParam:
ModuleTemplate.OnGetParam is never called, instead you have to use
OnGetParam of the module itself.
Probably I made some stupid error in my firsts attempts, and the
inconsistency between OnGetParam/OnReplaceTag didn't help.

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


Re: [fpc-pascal] fptemplate example wrong?

2015-04-18 Thread ABorka
The OnGetParam and OnReplaceTag are two totally different ways to handle 
templates. The former is the original version found in FPC packages, the 
latter is the newer, more Delphi-like - although enhanced - way to do 
templates. The two are mutually exclusive and controlled by the 
AllowTagParams flag (false - old way,  true - new way).


The fptemplate.txt file under the FPC sources, 
.../packages/fcl-base/texts/fptemplate.txt might help a little.


All the examples should work, BTW, with the new way, under 
.../packages/fcl-web/examples/fptemplate/...



AB

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


Re: [fpc-pascal] fpcup fails on Linux

2015-04-18 Thread David B Copeland
I also successfully built trunk (3.1.1) on Suse 13.1 from the
fpcbuild.zip, last Thursday (I think).

On 04/17/2015 07:22 AM, Stéphane Aulery wrote:
 Le vendredi 17 avril 2015 à 01:39:40, Juha Manninen a écrit :
 I found a similar error from last December, experienced by Waldo Kitty :
   https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg32256.html
 but there was no solution.

 Why it happens only with rstconv.pp? Many units were already compiled
 before that.
 My test system is a fresh XUbuntu, 32-bit. No FPC was installed before
 using fpcup.

 Can everybody else build FPC on Linux?
 I have build fpc directly form trunk Wednesday on Debian testing amd64, all 
 rights!.


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

Re: [fpc-pascal] fpcup fails on Linux

2015-04-18 Thread Juha Manninen
Thanks for everybody for testing.
I could finally install FPC trunk in my development machine, Mint
Linux 64-bit, using fpcup. I remember it failed also there earlier for
some reason.
I still don't know what caused the errors in the fresh XUbuntu and
other Linux distros in virtual machines. I hope fpcup will be
maintained again soon, it is a nice tool when it works.

Juha
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpcup fails on Linux

2015-04-18 Thread Marco van de Voort
In our previous episode, Juha Manninen said:
 Thanks for everybody for testing.
 I could finally install FPC trunk in my development machine, Mint
 Linux 64-bit, using fpcup. I remember it failed also there earlier for
 some reason.
 I still don't know what caused the errors in the fresh XUbuntu and
 other Linux distros in virtual machines. I hope fpcup will be
 maintained again soon, it is a nice tool when it works.

Does fpcup recycle checkouts with multiple attempts? If so kill fpmake.exe
and let it regenerate ?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpcup fails on Linux

2015-04-18 Thread Stéphane Aulery
Le vendredi 17 avril 2015 à 01:39:40, Juha Manninen a écrit :
 I found a similar error from last December, experienced by Waldo Kitty :
   https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg32256.html
 but there was no solution.
 
 Why it happens only with rstconv.pp? Many units were already compiled
 before that.
 My test system is a fresh XUbuntu, 32-bit. No FPC was installed before
 using fpcup.
 
 Can everybody else build FPC on Linux?

I have build fpc directly form trunk Wednesday on Debian testing amd64, all 
rights!.

-- 
Stéphane Aulery
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal