[Helma-user] accessing type.properties
Joshua Paine
joshua at papercrown.org
Thu Jul 3 05:32:18 CEST 2008
Breton Slivka wrote:
> You know what else you can do? You can set it programatically.
I saw those methods when I was investigating this, but didn't think to
try anything with them. (Maybe 'cause type.properties never really
bothered me?)
> I immediately set out to write an example of replacing
> type.properties with an Object Literal in javascript.
Is this tested and working? Does it work for all properties, even
_extends? Since helma will see and use changes to types while running
already, I guess this should work. Would love to hear from Hannes that
this won't cause lots of expensive cache invalidations that wouldn't
happen otherwise.
Really cool, though. And now that the possibility of controlling
type.properties from script appears, I begin to think of some things I'd
do with it.
I was going to reply with my discovery that you can put arbitrary named
values in type.properties, and if you start with _ and they're not magic
helma ones, they won't affect anything. So it'd be easy to specify the
order there--still a bit of repeating oneself, but all in one place at
least. This is a lot more interesting, though, and suggests ways to
optionally put more metadata into the [script version of] type
properties to get better forms for minimal effort.
More information about the Helma-user
mailing list