You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Paul Sorenson <pa...@classware.com.au> on 2001/08/13 13:00:38 UTC

including macro definitions

Would it be true to say that "macros defined inside a file A that is #parsed
in file B are not available to file B" (regardless of the value of
velocimacro.permissions.allow.inline.local.scope and )?

I have tried this myself and also dredged through the archive and am
guessing the answer is yes but it would be nice if that could be confirmed.



Re: including macro definitions

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Paul Sorenson wrote:
> 
> Geir - thanks, you also answered my next question, was this capability
> coming.
> The velocimacro.library approach will get me by until then.
> 
> Any tips on when is this capability is likely to become available?
> 

I am working on the VM stuff at the moment, trying to make autoloading
work for libraries so that you don't have to do anything special (like
dump the servlet runner) to get the VM libraries to auto-reload when you
make a change...  I will see what it takes to stuff this in too.  It's
not as trivial as it first appears.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb

Re: including macro definitions

Posted by Paul Sorenson <pa...@classware.com.au>.
Geir - thanks, you also answered my next question, was this capability
coming.
The velocimacro.library approach will get me by until then.

Any tips on when is this capability is likely to become available?

Cheers

----- Original Message -----
From: "Geir Magnusson Jr." <ge...@optonline.net>
To: <ve...@jakarta.apache.org>
Sent: Monday, August 13, 2001 9:15 PM
Subject: Re: including macro definitions


> Sort of.  The problem is that #parse() is a runtime thing, and the
> decision about weather #<foo> is a VM is a parse-time thing, so you
> really can't #parse() in a set of VMs right now (it's coming...)
>
> However, the VM system supports having any number of VM libraries that
> will be loaded at startup :
>
> velocimacro.library = lib1.vm, lib2.vm, lib3.vm, etc



Re: including macro definitions

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Paul Sorenson wrote:
> 
> Would it be true to say that "macros defined inside a file A that is #parsed
> in file B are not available to file B" (regardless of the value of
> velocimacro.permissions.allow.inline.local.scope and )?

Sort of.  The problem is that #parse() is a runtime thing, and the
decision about weather #<foo> is a VM is a parse-time thing, so you
really can't #parse() in a set of VMs right now (it's coming...)

However, the VM system supports having any number of VM libraries that
will be loaded at startup :

velocimacro.library = lib1.vm, lib2.vm, lib3.vm, etc

> 
> I have tried this myself and also dredged through the archive and am
> guessing the answer is yes but it would be nice if that could be confirmed.

:)

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb