> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Geir Magnusson Jr.
> 
> Paulo Gaspar wrote:
> 
> > > > something gets written all the time, even if the
> > > > $emptyVar is really "empty".
> > >
> > > Can you define empty?  You mean not in the context?
> > 
> > Usually it is an expression like:
> >   $someObject.property
> > 
> > And in most cases, the object is a ResultSet wrapper with has
> > a method looking like:
> >   public Objec get(String i_name)
> > 
> > The problem is when this method returns null.
> 
> Ok.  That's better.

Give me some pointers. I would like to understand how that works even
if you fix it by yourself.

> ... (Lots of good stuff that makes almost everything clear to me) ...
>
> > I still think that this is the most intuitive way to have macro
> > functionality. Why is it not that way?
> > (Just want to understand if there is a reason.)
> 
> The model it has is because of the way it evolved - we always tried to
> remain backwards compatible when we relized the problems in the model.

Careful. I sure understand the motivation but some things are better fixed 
early or they become unwanted bloat.

> > I would also like to know if we could have global macros being
> > explicitly declared (and changed with each page change) or globally
> > available trough some registration/magic-file-or-directory mechanism.
> 
> You can :
> 
> 1) Have global ones set at startup, and no one else can add.
> 
> 2) Have global ones set at startup, others can add only new ones
> 
> 3) Have global ones set at startup, and modified by others during
> runtime.
> 
> 4) Have global ones set at startup, no new global ones at runtime, but
> template-local ones at runtime.

4 is PERFECT to me.
What about copying and pasting the above, together with the necessary 
settings into the docs if you are going to "fix" them? That would make
their working model crystal clear.

Anyway, I must repeat that Velocity is by far the better document Open
Source package I use. It is also much better than some commercial 
software I used in the past. (I mostly use OS these days.)


> I can't think of a way to have runtime-modified globals while
> template-local in effect w/o changing the template syntax so you can
> indicate namespace, something I believe isn't the right thing to do in
> VTL.  

No, no. That would be unnecessary complexity.

But are local templates with the same name as the global templates 
allowed and used (locally) instead of the global ones?

Keep in mind that I am willing to help on this issues.


> The other solution is to add some sort of API, but again - I can't see
> this as a big problem.

Agreed.
 

Thank you very much,
Paulo Gaspar

Reply via email to