Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-11

ProjTemplates package issues & bugs

11 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

patspiper

I have read about the ProjTemplates package on several occasions, especially that project templates could help set defaults for projects.

I created a project, saved it (along with a suitable project.ini file) in a sub-directory of the templates directory (which was configured in Tools/Project Templates Options), fired up the IDE, and clicked on File/New Project From Template/MyTemplate.

I named the project project3 and selected a directory, then clicked in the variable value grid cell. I could only type one character (BUG1). I had to click another time to be able to enter more than one character.

I pressed OK and got a message dialog asking me whether to open the project directory/project3.lpi (BUG2) and was presented with 3 buttons: Open Project, Open as XML file, and Cancel. The only sane option is Cancel, especially that Open Project will lead to a Division by Zero exception.

At this stage, the project should have been either fully saved, or created as a virtual project (my guess is that it should be a virtual project, but there were newly created files in the project folder). I pressed the Save All button (it was enabled!) to save the project and got a message dialog: The project information file "directory/project3.lpi" has changed on disk (BUG3): Reopen Project, Ignore. I chose Ignore. I had noticed that the lpi on disk had the template project's compiler options, but the IDE version had the IDE's project defaults (BUG4), so ignore made me lose these.

Since I am not familiar with this package, I wanted to get some feedback before I report the bugs on mantis.

Reply by email

Graeme Geldenhuys
to patspiper

Op 2010-11-01 17:15, patspiper het geskryf:

Since I am not familiar with this package, I wanted to get some feedback before I report the bugs on mantis.

I get all the same bugs you mention and then some... The "project templates" is a nice idea in the IDE, but practically it is riddled with bugs and is simply not usable at this point. Other than you and myself, I don't think anybody has actually tried to use that IDE add-on.

It was simply easier to create my own IDE add-on package which registers a new project type, by-passing the IDE Templates idea. For an example of such a IDE add-on package, have a look at the following URL (part of fpGUI repository)

http://tinyurl.com/2cthede

...or the original looooong URL...

http://fpgui.git.sourceforge.net/git/gitweb.cgi?p=fpgui/fpgui;a=tree;f=extras/lazarus_ide;h=4d006c843d0ed5c550161d13f31b103342d71398;hb=HEAD

I'm not sure, but I think there might be similar examples included with Lazarus sources.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/

Reply by email

Michael Van Canneyt
to patspiper: I have read about the ProjTemplates package on several occasions, especially that project…
patspiper wrote 11 lines
I have read about the ProjTemplates package on several occasions, especially that project templates could help set defaults for projects. I created a project, saved it (along with a suitable project.ini file) in a sub-directory of the templates directory (which was configured in Tools/Project Templates Options), fired up the IDE, and clicked on File/New Project From Template/MyTemplate. I named the project project3 and selected a directory, then clicked in the variable value grid cell. I could only type one character (BUG1). I had to click another time to be able to enter more than one character.

This should be reported as a bug in the string grid component. That's all that is being used. No special handling whatsoever.

Show quoted text 5 lines
I pressed OK and got a message dialog asking me whether to open the project directory/project3.lpi (BUG2) and was presented with 3 buttons: Open Project, Open as XML file, and Cancel. The only sane option is Cancel, especially that Open Project will lead to a Division by Zero exception.

This should be reported as a bug; You're not supposed to get this dialog at all. Maybe the IDE internals have changed since the time the project template package was used.

Show quoted text 9 lines
At this stage, the project should have been either fully saved, or created as a virtual project (my guess is that it should be a virtual project, but there were newly created files in the project folder). I pressed the Save All button (it was enabled!) to save the project and got a message dialog: The project information file "directory/project3.lpi" has changed on disk (BUG3): Reopen Project, Ignore. I chose Ignore. I had noticed that the lpi on disk had the template project's compiler options, but the IDE version had the IDE's project defaults (BUG4), so ignore made me lose these.

I think that these are consequences of bug 2, so fixing bug 2 should fix this as well.

Michael.

Reply by email

Felipe Monteiro de Carvalho
to Graeme Geldenhuys: Op 2010-11-01 17:15, patspiper het geskryf: I get all the same bugs you mention and then…
Graeme Geldenhuys wrote
I get all the same bugs you mention and then some... The "project templates" is a nice idea in the IDE, but practically it is riddled with bugs and is simply not usable at this point. Other than you and myself, I don't think anybody has actually tried to use that IDE add-on.

Every time you do "make bigide" this is used, because the daemon templates and the fpWeb templates are added via packages.

Felipe Monteiro de Carvalho

Reply by email

patspiper
to Graeme Geldenhuys: Op 2010-11-01 17:15, patspiper het geskryf: I get all the same bugs you mention and then…
Graeme Geldenhuys wrote 22 lines
I get all the same bugs you mention and then some... The "project templates" is a nice idea in the IDE, but practically it is riddled with bugs and is simply not usable at this point. Other than you and myself, I don't think anybody has actually tried to use that IDE add-on. It was simply easier to create my own IDE add-on package which registers a new project type, by-passing the IDE Templates idea. For an example of such a IDE add-on package, have a look at the following URL (part of fpGUI repository) http://tinyurl.com/2cthede ..or the original looooong URL... http://fpgui.git.sourceforge.net/git/gitweb.cgi?p=fpgui/fpgui;a=tree;f=extras/lazarus_ide;h=4d006c843d0ed5c550161d13f31b103342d71398;hb=HEAD I'm not sure, but I think there might be similar examples included with Lazarus sources.

If there are no such examples included with the Lazarus sources, then I suggest that your package, or a similar one that does not depend on fpgui, be included in the examples folder of Lazarus. It is instructive and would save a lot of time for someone trying to achieve the same.

Reply by email

Michael Van Canneyt
to patspiper
patspiper wrote 27 lines
On 11/02/2010 09:24 AM, Graeme Geldenhuys wrote: > > I get all the same bugs you mention and then some... The "project > templates" is a nice idea in the IDE, but practically it is riddled with > bugs and is simply not usable at this point. Other than you and myself, I > don't think anybody has actually tried to use that IDE add-on. > > It was simply easier to create my own IDE add-on package which registers a > new project type, by-passing the IDE Templates idea. For an example of such > a IDE add-on package, have a look at the following URL (part of fpGUI > repository) > > http://tinyurl.com/2cthede > > ..or the original looooong URL... > > http://fpgui.git.sourceforge.net/git/gitweb.cgi?p=fpgui/fpgui;a=tree;f=extras/lazarus_ide;h=4d006c843d0ed5c550161d13f31b103342d71398;hb=HEAD > > > I'm not sure, but I think there might be similar examples included with > Lazarus sources. > > If there are no such examples included with the Lazarus sources, then I suggest that your package, or a similar one that does not depend on fpgui, be included in the examples folder of Lazarus. It is instructive and would save a lot of time for someone trying to achieve the same.

The fpweb, daemonapp, fpcunit packages all contain samples of how to do this.

Michael.

Reply by email

patspiper
to Michael Van Canneyt: This should be reported as a bug in the string grid component. That's all that is being…
Michael Van Canneyt wrote 47 lines
On Mon, 1 Nov 2010, patspiper wrote: > I have read about the ProjTemplates package on several occasions, > especially that project templates could help set defaults for projects. > > I created a project, saved it (along with a suitable project.ini > file) in a sub-directory of the templates directory (which was > configured in Tools/Project Templates Options), fired up the IDE, and > clicked on File/New Project From Template/MyTemplate. > > I named the project project3 and selected a directory, then clicked > in the variable value grid cell. I could only type one character > (BUG1). I had to click another time to be able to enter more than one > character. This should be reported as a bug in the string grid component. That's all that is being used. No special handling whatsoever. > > I pressed OK and got a message dialog asking me whether to open the > project directory/project3.lpi (BUG2) and was presented with 3 > buttons: Open Project, Open as XML file, and Cancel. The only sane > option is Cancel, especially that Open Project will lead to a > Division by Zero exception. This should be reported as a bug; You're not supposed to get this dialog at all. Maybe the IDE internals have changed since the time the project template package was used. > > At this stage, the project should have been either fully saved, or > created as a virtual project (my guess is that it should be a virtual > project, but there were newly created files in the project folder). I > pressed the Save All button (it was enabled!) to save the project and > got a message dialog: The project information file > "directory/project3.lpi" has changed on disk (BUG3): Reopen Project, > Ignore. I chose Ignore. I had noticed that the lpi on disk had the > template project's compiler options, but the IDE version had the > IDE's project defaults (BUG4), so ignore made me lose these. I think that these are consequences of bug 2, so fixing bug 2 should fix this as well. Michael.

Reported in:
http://bugs.freepascal.org/view.php?id=17801
http://bugs.freepascal.org/view.php?id=17802

Reply by email

patspiper
to Michael Van Canneyt: The fpweb, daemonapp, fpcunit packages all contain samples of how to do this. Michael.
Michael Van Canneyt wrote 11 lines
> If there are no such examples included with the Lazarus sources, then > I suggest that your package, or a similar one that does not depend on > fpgui, be included in the examples folder of Lazarus. It is > instructive and would save a lot of time for someone trying to > achieve the same. The fpweb, daemonapp, fpcunit packages all contain samples of how to do this. Michael.

Can a reference to these "samples" be mentioned in the readme.txt as well as the pertaining wiki page?

Thanks

Reply by email

Felipe Monteiro de Carvalho
to patspiper
patspiper wrote
Can a reference to these "samples" be mentioned in the readme.txt as well as the pertaining wiki page?

Sure, why not? We encourage people to contribute patches to the readme and to edit the wiki.

Felipe Monteiro de Carvalho

Reply by email

patspiper
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 9 lines
On Tue, Nov 2, 2010 at 11:10 AM, patspiper wrote: > Can a reference to these "samples" be mentioned in the readme.txt as well as > the pertaining wiki page? > Sure, why not? We encourage people to contribute patches to the readme and to edit the wiki.

I cannot agree with you more ;)

Reply by email