On Mon, Feb 26, 2001 at 05:30:26PM -0500, Jason van Zyl wrote:
> > Right now, we have (for tools in a global per-request scope):
> > 
> >      context.put ( "data", data );
> >      context.put ( "link", new TemplateLink(data) );
> >      context.put ( "page", new TemplatePageAttributes(data) );
> >      context.put ( "content", new ContentURI(data) );
> > 
> > I'm starting to think that the current objects that are in this namespace
> > should just remain in that namespace as breaking existing templates would be
> > bad.

Absolutely - we can't go telling everyone that $link is now
$toolbox.link, quite apart from the fact that typing $toolbox.link all
the time would be a PITA.

> > I think that new objects should be configured via a $toolbox just like they
> > are already. I don't like the idea of getting rid of $toolbox because of
> > namespace issues as well as the fact that it helps keep the whole idea that
> > there are "tools" in the "toolbox".
> 
> I think the templates would actually be much cleaner without
> the $toolbox prefix, and I don't think the template engineer
> really cares about the toolbox per se, they just want to
> know what they are supposed to use. I have honestly found
> 
> $toolbox.ui.bgcolor a little cumbersome and would actually
> prefer to use $ui.bgcolor. I think someone would have to
> be fairly careless to run into a namespace problem given
> that everything is setup in TR.props.
> 
> I'm still +1 for 2) :-)

I'm with Jason here, not least because I'm just about ready to commit
the code that implements (2) :-)

But on top of that I think that what the Context _is_ is a "toolbox" and
that typing $toolbox is superfluous. The only default tools that the
TR.properties I'm about to check in provides are $link, $page, $content
and $ui ($data I regard as a special case, and so is still hardcoded).
So over and above what we've had already there's only $ui - and if
someone is already putting something in the context as $ui in their
screen then it will overwrite the $ui we put in, and if they really want
to use the UIManager as well they can always change TR.props so $ui
becomes $uitool or something...

I really don't think namespace collision is a big deal here...

-- 
Sean Legassick
[EMAIL PROTECTED]
      Je suis un homme: rien d'humain en m'est étranger  
      
      


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to