General
Options system
2009-01-17 10:10 UTC · Q (#249)
Properties are a bit drab
Noone knows what does what, no descriptions...
So what I'm writing is what I'm calling an options system. Kazemi gave me the idea when she wanted to know if there was a way to turn off surface items listing their contents in their titles.
There is, actually, a way to do this -- setting the .tell_in_title prop to 0 -- but that's a bit of an oddly-named property -- and one might not guess that it should be set to 1 or 0.
So, I'm writing a basic options object. right now it defines get/set_option, create_option, delete_option... well, not much of that is coded but it will all be. But I have a few questions in terms of how you all, as programmers, want to see things.
I.E. We could go around going ;this:get_option("title_list") or whatever ... and it would use get_option which would check this.title_list_opt... Which works just fine. Or we could sort of half-way upgrade the options system.
What I mean by this is just have a list on the object of properties which are options. Write a UI on top of them like I am going to do with the options system anyway, and just let the properties alone in a list.
Obviously the list could be corrupted and isn't as foolproof as the first system I outlined -- but it would be plug-and-play and just work. The first also offers the benefit of adding descriptions and other metadata to options.
Suggestions? thoughts? Which system should I go with or can you suggest something better?