[Radiant] Can a behavior's tag processing code access the filter ID?

John W. Long ng at johnwlong.com
Tue Aug 8 11:53:31 CDT 2006


Andrew Hodgkinson wrote:
> Is there a clean way for a behavior, within some code implementing a 
> particular tag for that behavior, to access the ID of the text filter 
> which is in effect during the moment when the tag is processed?

Probably not.

> At the moment, I'm overriding the private parse_object method, storing 
> object.filter_id in an instance variable and checking this inside the 
> tag processing code. That's pretty nasty. Since parse_object is a 
> private method it has every right to change signature, operation or even 
> vanish in a future version of Radiant so the code I'm currently using is 
> asking for trouble!

That's probably the best way for now. If you'd like to suggest an 
alternative with a patch I'd consider applying it.

--
John Long
http://wiseheartdesign.com



More information about the Radiant mailing list