Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Parameter number conflict.

0
0
Perhaps something like this:
engine.AddHostObject("$", new DollarSignFunc((arg1, arg2) => {
    var name = arg1 asstring;
    if (name == null)
        new Window(f).AddEventHandler("Load", arg1);
    elseif (arg2 != null)
        new Window(f).AddEventHandler(name, arg2);
    else {
        // add code here
    }
}));
As long as the calling pattern can be inferred from the arguments, you can support as many as you need.

Cheers!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images