[fpc-pascal] fcl-web webdata example(s) on Windows has some problems

Michael Van Canneyt michael at freepascal.org
Mon Aug 16 09:28:02 CEST 2010



On Sun, 15 Aug 2010, ABorka wrote:

>>> WinXP 32, FPC and Lazarus latest SVN checkout.
>>> 
>>> I was trying to play a little bit with the promising new fcl-web
>>> webdata features to see how JSON/EXTJS works with FPC/Lazarus and came
>>> up with the following problems in the first demo example
>>> 
>>> ...fpcdir...\packages\fcl-web\examples\webdata\demo\
> .
> .snip
> .
>>> I could not yet figure out what the problem is due to limited time at
>>> the moment (2:00AM), any suggestions would be welcomed to find the
>>> solution/fix.
>> 
>> I have fixed the example. Revision 15817.
>> 
>> Michael.
>
> Hi Michael,
>
> Thanks for the fix. I really look forward to use these new features.
> I was testing a little further and here are the current results.
> (Sorry if this is a little bit lengthy, but I would really like to see this 
> through and have super demo programs for both Linux/Windows people.
> Also, to learn how to use these new Lazarus/FPC features, of course.)
> If I can help with some simple works to get this done - other than these 
> testings - , please let me know how.

The more it is tested, the better. 
If you have ideas for improvement, please let us know.

>
> a; fcl-web, fpweb general
> 1. It would be really nice to have the fpweb action names generated properly 
> (like Delphi) in Lazarus ( http://bugs.freepascal.org/view.php?id=15820 )

I think this can be fixed in fpweb by implementing 'GetDisplayName' in the
actions.

>
> 2. The other demo apps (demo2...demo6) also have the .rc file line in the 
> project .lpr source
>
> 3. Demos.txt in the ...examples\webdata\ folder mentions Demo1, but the 
> directories go as Demo, Demo2, Demo3 ...

:/ I'll fix this.

>
> 4. The other fpweb dependent demos (ex: fptemplate) were moved into the 
> \lazarus\components\fpweb\demo\ directory from the fpc\packages\fcl-web. 
> Shouldn't we have these demo programs in one place only?

Yes and no. 
In theory, the demos can work without Lazarus, so it is fitting to put them
in the FCL. But I do use lazarus to develop them, simply because it is much
more easy then.

>
> 5. Packages "weblaz" and "lazwebextra" in Lazarus (under fpweb directory) 
> should have somewhat similar name and definitely some description. In the 
> Lazarus fpweb directory the file names and package names need to be organized 
> a little bit. I know this is vague...

I will submit patches with better descriptions.

>
>
> b; demo (...\examples\webdata\demo)
> 1. Delete button should maybe have a confirmation dialog and to not have to 
> click on Save after clicking on Delete to actually delete a record.

I will gladly accept patches for this :-)

>
> 2. minor, nice to have: Maybe autosave after leaving any cell after editing? 
> Bigot Excel/OpenOffice using customers will expect it to work like that. I 
> know this is just a simple demo...

Same remark as previous. ExtJS has 'autoSave : true' so it should not be
hard.


>
> 3. Maybe note for Windows people that they probably need to put the CGI 
> program into their cgi-bin directory after compilation, and copy the .dbf 
> file next to it.

? if you use Apache, then an AddHandler .cgi cgi statement should enable
execution of CGI programs anywhere ?

Are you using IIS ?

> Then they need to modify the extgrid*.js files and change the extgrid.cgi to 
> something like "http://127.0.0.1:8080/cgi-bin/extgrid.cgi" or similar (it 
> works with .cgi on Windows with Apache, there is no need to have the .exe 
> extension).
> Also, to put the .html and .js files into their DocumentRoot directory under 
> folder "demo" or something.
> Also, to unzip the downloaded extjs zip file into their DocumentRoot (and 
> there will be an ignorable problem in the docs folder somewhere during 
> unzipping, because it seems extjs uses menu.html and Menu.html files in the 
> same directory in one place /v3.2.1/, which Windows does not support).

In short: more installation instructions for the demos ?

>
> 4. The JSON html is working now, but the xml one doesn't list anything in the 
> grid. This might be that I did something wrong, will check demo2 and try both 
> there.
>
>
> c; demo2 - demo6
> 1. "The following package failed to load: lazwebdata" (there are a 
> lazwebdata.pas and reglazwebdata.pp files in the demo directory, so that 
> might be something to use somehow)

No, this is the old package name before it was renamed to lazwebextra. 
I will check this.

>
> 2. minor, nice to have: Would be nicer to use different project names than 
> extgrid (extgrid.cgi) for people who only use the cgi-bin directory to put 
> CGI programs on their web server installation and do not overwrite the other 
> demo project CGI programs.

This could be done, yes. I'll gladly accept patches for this.

Michael.




More information about the fpc-pascal mailing list