I believe that the config, exactly as you pasted it, will work just fine. Specifically, if in MyElement::configure(), you use cp_va_kparse with cpElementCast, 0, "MyOtherElement", &_other_elt_ptr,
then I believe that you will see exactly the effect that you want. When searching for the element named e2, it will start in the current scope (the elementclass instantiation) and search upwards until it finds a match. Cliff 2010/4/7 Harald Schiöberg <[email protected]> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > Is there a clean way to express this within a click config: > > elementclass MyClass { > MyElement(OTHER_ELEMENT e2) > e2 :: MyOtherElement() > } > > This should read something like : > MyElement(OTHER_ELEMENT $CLASS_INSTANCE_NAME/e2) > > is there something along these lines ? > > thanks, > - -- > Harald Schiöberg > Technische Universität Berlin | T-Laboratories | FG INET > www: http://www.net.t-labs.tu-berlin.de > Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFLvHOky8wrZ9OvkU0RAtfYAJ0a1Sf5Bu2pC5rUtuu/webYGn9tsACgvbXY > QBq2szIgvAkMtWGvpafa9pA= > =5q+l > -----END PGP SIGNATURE----- > > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
