[Click] Returning information in click
Eddie Kohler
kohler at icir.org
Fri Dec 5 17:36:24 EST 2003
Hi Bow-Nan,
> I want to write an element that takes in some arguments, does some
> calculations based on that stuff, and then "return" say an "IP Address" to
> the .click file so that in the .click file, I want to do something like:
I'm afraid that is difficult. The best way would be to do the calculations
before generating the Click script. If you really needed to do something at
initialization time, you'd probably have to register a new address with the
AddressInfo class. You'd have to give your element an early
configure_phase() [so it was initialized before any other element that
might need an IP address], and add a method to AddressInfo for dynamic
addition of IP address synonyms [we might do that for you]. But again, the
recommendation is, Do it outside of Click.
Eddie
More information about the click
mailing list