Joshua Kugler wrote: > defined('lr.windSpeedAvg') certainly returns false, even when > lr.windSpeedAvg exists, which is expect, as it's a wrapper for hasattr. > > So, how would I check if an attribute exists when it's an attribute of an > object in the templates name space?
It returns false, because "lr.windSpeedAvg" is not an attribute of your template, even though "lr" is an attribute of your template, and "windSpeedAvg" is an attribute of "lr". The question is: What do you want to check, whether "lr" itself is defined, or only whether "windSpeedAvg" is an Attribute of "lr"? Or both? That would be: defined('lr') and hasattr(lr, 'windSpeedAvg') -- Christoph ------------------------------------------------------------------------- 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 _______________________________________________ kid-template-discuss mailing list kid-template-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kid-template-discuss