View Issue Details

IDProjectCategoryView StatusLast Update
0012120LazarusIDEpublic2013-09-03 12:07
ReporterWayne BartnickAssigned ToZeljan Rikalo 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version0.9.24Product Build 
Target VersionFixed in Version0.9.29 (SVN) 
Summary0012120: Default {$mode} Setting
DescriptionIt would be cool to select the default $mode when adding new units to a project. I typically use {$mode delphi}, but all new units added default to {$mode objfpc}.
TagsNo tags attached.
Fixed in Revision
LazTarget1.4
Widgetset
Attached Files

Activities

Paul Ishenin

2008-09-11 02:31

manager   ~0022129

Look at the Compiler options -> Parsing -> Syntax Mode. And close a report if you are satisfied.

Paul Ishenin

2008-09-11 02:32

manager   ~0022130

And please use snapshot/svn version when you are reporting a bug.

Wayne Bartnick

2008-09-14 01:27

reporter   ~0022204

Please forgive the question, but does the -MDelphi compiler mode override all {$mode} directives in individual units? If so, I'll be glad to close the issue out.

Vincent Snijders

2008-09-14 09:28

manager   ~0022210

No, it does not.

Graeme Geldenhuys

2008-09-15 09:55

reporter   ~0022237

What we do in our projects is use a include file with specifies the compiler mode and any other defines we need. You can go one step further and setup a new file template in Lazarus to add a unit with such a include line already added if you want. It might not be ideal for you, but it works fine for us.

eg:

-------------------------------
unit Unit1;

{$I M2Defines.inc}

interface
uses
  SysUtils, Classes;
...
-------------------------------

Vincent Snijders

2008-09-15 10:31

manager   ~0022241

Graeme, do you know if there is a howto about adding new unit templates or project templates, for example in the wiki?

Mattias Gaertner

2008-09-15 10:55

manager   ~0022243

There is a readme:
components/projecttemplates/README.txt

Maybe a wiki page can be started with this.

Graeme Geldenhuys

2008-09-15 11:16

reporter   ~0022244

Last edited: 2008-09-15 11:17

I don't know of a wiki page, but there is a readme file in the 'projecttemplates' folder. Alternatively (what I did before I knew about the Templates Package), have a look at the fpcUnit add-on package and see how a new template is added to the IDE's File | New... dialog.

The "project templates" package is much easier to use by the way... :-)

Zeljan Rikalo

2010-03-08 20:02

developer   ~0035043

This is resolved during 0.9.29 (think november/december 2009) - Mattias done it.

Issue History

Date Modified Username Field Change
2008-09-11 01:12 Wayne Bartnick New Issue
2008-09-11 02:31 Paul Ishenin Status new => resolved
2008-09-11 02:31 Paul Ishenin Fixed in Version => 0.9.25 (SVN)
2008-09-11 02:31 Paul Ishenin Resolution open => no change required
2008-09-11 02:31 Paul Ishenin Assigned To => Paul Ishenin
2008-09-11 02:31 Paul Ishenin Note Added: 0022129
2008-09-11 02:32 Paul Ishenin Note Added: 0022130
2008-09-14 01:27 Wayne Bartnick Status resolved => assigned
2008-09-14 01:27 Wayne Bartnick Resolution no change required => reopened
2008-09-14 01:27 Wayne Bartnick Note Added: 0022204
2008-09-14 09:28 Vincent Snijders Note Added: 0022210
2008-09-14 09:30 Vincent Snijders LazTarget => post 1.2
2008-09-14 13:44 Paul Ishenin Assigned To Paul Ishenin =>
2008-09-14 13:44 Paul Ishenin Status assigned => acknowledged
2008-09-15 09:55 Graeme Geldenhuys Note Added: 0022237
2008-09-15 10:31 Vincent Snijders Note Added: 0022241
2008-09-15 10:55 Mattias Gaertner Note Added: 0022243
2008-09-15 11:16 Graeme Geldenhuys Note Added: 0022244
2008-09-15 11:17 Graeme Geldenhuys Note Edited: 0022244
2010-03-08 20:02 Zeljan Rikalo Status acknowledged => resolved
2010-03-08 20:02 Zeljan Rikalo Fixed in Version 0.9.25 (SVN) => 0.9.29 (SVN)
2010-03-08 20:02 Zeljan Rikalo Resolution reopened => fixed
2010-03-08 20:02 Zeljan Rikalo Assigned To => Zeljan Rikalo
2010-03-08 20:02 Zeljan Rikalo Note Added: 0035043
2011-11-21 17:47 Zeljan Rikalo Status resolved => closed
2013-09-03 12:07 Martin Friebe LazTarget post 1.2 => 1.4