My end goal is to load a class that will act as a template, So to add
new templates, all i need to do is add another js file with a template
class in it:

js file:
=========
templates.push({title:'generic'});
var generic = new Class({});


template chooser:
========
if(templates.length > 0) {
    select = new Element('select');

    templates.each(function(el){
        opt = new Option(el.title,el.title);
        select.grab(opt);
    });
}


so something like this w/ eval.
http://mootools.net/shell/yL93N/7/



On Feb 16, 5:29 pm, Ryan Florence <rpflore...@gmail.com> wrote:
> I'd do it like this:
>
> http://mootools.net/shell/yL93N/6/
>
> On Feb 16, 2010, at 5:57 PM, jiggliemon wrote:
>
> > Anyone have any insight as to how I could execute a function by
> > reference?
>
> >http://mootools.net/shell/yL93N/1/
>
> > -Chase

Reply via email to