Sign in Join

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

Mailing lists / lazarus / 2011-06

New project type: how to open unit automatically

7 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

I have had a add-on package for Lazarus for age now. It registers a new project type "fpGUI Toolkit Application".

But when I go "File > New > fpGUI Toolkit Application", there are now files opened in the editor window. How do I tell Lazarus to open the project.lpr file, after creating the new project?

Regards,
- Graeme -

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

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 8 lines
Hi, I have had a add-on package for Lazarus for age now. It registers a new project type "fpGUI Toolkit Application". But when I go "File > New > fpGUI Toolkit Application", there are now files opened in the editor window. How do I tell Lazarus to open the project.lpr file, after creating the new project?

Creating a new project should close all open files. Can you send me the package?

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner
Mattias Gaertner wrote
Creating a new project should close all open files. Can you send me the package?

It's included in the fpGUI repository in the 'extra/lazarus_ide/' directory. I attached that directory archived to this email.

The package in question is 'fpgui_ide.lpk'

- It registers the new project type correctly.
- It creates the new project correctly.
- It references the 'fpgui_toolkit' package as a
project requirement correctly.
- It just doesn't open the project1.lpr file, so the developer stares at an empty looking Lazarus IDE (no editor window visible).

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: lazarus_ide.tar.gz Type: application/x-gzip Size: 3444 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110610/5ba19b86/attachment-0001.bin>

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 17 lines
On 10/06/2011 15:12, Mattias Gaertner wrote: > > Creating a new project should close all open files. > Can you send me the package? It's included in the fpGUI repository in the 'extra/lazarus_ide/' directory. I attached that directory archived to this email. The package in question is 'fpgui_ide.lpk' - It registers the new project type correctly. - It creates the new project correctly. - It references the 'fpgui_toolkit' package as a project requirement correctly. - It just doesn't open the project1.lpr file, so the developer stares at an empty looking Lazarus IDE (no editor window visible).

The IDE now opens the main source if no secondary sources were created.

Mattias

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 6 lines
On 10/06/2011 16:20, Mattias Gaertner wrote: > > The IDE now opens the main source if no secondary sources were created. Just added, or already existing in Trunk? I take it this will not be back-ported to the Lazarus stable branch?

It's a feature, so I guess not.

You could have opened it already before by overriding CreateStartFiles and calling DoOpenEditorFile.
The new change just makes things more comfortable and I hope does not break any existing project.

Mattias

Reply by email