Recent

Author Topic: Available macros in code templates  (Read 6213 times)

wimpie

  • New Member
  • *
  • Posts: 32
Available macros in code templates
« on: October 28, 2009, 07:40:55 pm »
Hi all

I want to create a code template that will insert the date and the filename upon creation of the template. The date I managed using $Date(). Is there a way to get the file's name?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Available macros in code templates
« Reply #1 on: October 28, 2009, 08:47:00 pm »
See: http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames
I guess EdFile can be used.

At least I hope that these macroes are available in the code templates too.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Available macros in code templates
« Reply #2 on: October 28, 2009, 08:49:14 pm »
Hmm, it seems to a different list of macros. Maybe somebody on the Lazarus list has an idea, otherwise it is a new feature request.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Available macros in code templates
« Reply #3 on: October 28, 2009, 08:55:22 pm »

wimpie

  • New Member
  • *
  • Posts: 32
Re: Available macros in code templates
« Reply #4 on: October 29, 2009, 05:47:46 pm »
Thanks for the ideas. Those macros only get expanded at compile time. The list of macros that get expanded during template insertion is quite short.

I will add this as a feature request in Mantis.

 

TinyPortal © 2005-2018