Sign in Join

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

Mailing lists / lazarus / 2015-11

Dynamic resolution of IDE Macros (at first usage)

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Luiz Americo Pereira Camara

I'd like to setup a IDE Macro to be used in project output file path.

Since the value of this Macro is enviroment dependent (the directory of a web server) it can not be saved hardcoded in project options

I have in mind a feature that when an unknow macro is found a dialog is show asking for the Macro value then store in Session file.

I looked in Conditionals / Additions and overrides and could not find how accomplish this.

Is it possible with the current IDE features?

Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151108/db6f884b/attachment.html>

Reply by email

Mattias Gaertner
to Luiz Americo Pereira Camara
I'd like to setup a IDE Macro to be used in project output file path. Since the value of this Macro is enviroment dependent (the directory of a web server) it can not be saved hardcoded in project options

You can use $Env(WEBDIR).

I have in mind a feature that when an unknow macro is found a dialog is show asking for the Macro value then store in Session file.

How to change it later?
It would be a bad GUI. Users expect a browse button to select the directory.

I looked in Conditionals / Additions and overrides and could not find how accomplish this. Is it possible with the current IDE features?

Mattias

Reply by email

Luiz Americo Pereira Camara
to Mattias Gaertner
"Mattias Gaertner" wrote 8 lines
On Sun, 8 Nov 2015 16:38:47 -0300 Luiz Americo Pereira Camara > I have in mind a feature that when an unknow macro is found a dialog is > show asking for the Macro value then store in Session file. How to change it later?

Good question. There's no GUI to edit CustomSessionData which is used by some packages

Since there's currently no way, i will write an addon to register a Macro $CustomDir to save / restore from CustomSessionData.

In addition will create a GUI to edit stored values

At first look, should be easy. Will call again if get stuck somehow

Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20151108/7ad90644/attachment.html>

Reply by email