From: Eric B. R. <eb...@tc...> - 2003-07-31 00:46:44
|
On Wednesday, July 30, 2003, at 07:50 PM, Keats wrote: > I'm busily refactoring the function stuff and I suddenly realized that > all I had to do was make FunctionCall implement Macro and everything > becomes a lot simpler. The FunctionCall.eval() takes care of almost > everything, so Context.internalGet() becomes real simple. See below. > > The only real function code left in Context is keeping track of local > functions. I'm wondering if anybody even cares about local functions. > They could be pretty powerful but maybe it's not worth it. We'll > have to discuss this later. By "local functions", you mean local to a Context, right? I'd like to see this stay around. The advantages of being able to add my own functions w/o editing wm.properties are many, imho. eric > > I hope to test and commit by week's end ... > > Keats > > ==================================================== > > protected Object internalGet (Object name) > { > Object ret = _variables.get(name); > if (ret == null && !_variables.containsKey(name)){ > // not found in context. Check for auto-loading variable. > if (name instanceof String) { > Object var = > _broker.getAutoContextVariable((String)name, this); > if (var != null) { > // auto-loading variable loaded. Add to context. > put(name, var); > ret = var; > } > } > else if (name instanceof FunctionCall) > ret = name; > else > ret = UNDEF; > } > return ret; > } > ======================================== > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/ > direct;at.aspnet_072303_01/01 > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel |