On Wed, 4 Apr 2007, William Cox wrote: > i'm trying to do something a little wonky and would like to put it > forth to you guys to your feedback. i have a bunch of main level > components that all have a header component as their first action. > then there are a bunch of other components called later on in the main > component. what im trying to do is get the header comp to determine > what components are about to be called. this would be easy if it was a > footer component, just read through the stack. but at the beginning of > the request, the stack doesnt exist yet. > so my initial thought is to parse through the main comps source and > pull out what i need (and cache it of course). but this is a bit > brutish IMO. is there useful information from the lexer/compiler that > could be used? or any thoughts on parsing the code?
Use an autohandler. Do something like this: $string = $m->scomp('mainpagename'); $footstring = # footer calculations here print $string; print $footstring; All totally untested, of course, but it's an idea. :) --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: [EMAIL PROTECTED] | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK----- ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users