--- Bill Kendrick <[EMAIL PROTECTED]> wrote: > On Wed, May 26, 2004 at 08:21:43PM -0700, Jan W wrote: > > 2. The config file reader isn't even started. I figured this would be a > > function in defaults.cxx, that reads the config file and passes on the > various > > options to the widget definitions. The functions that check if a value is > > default needs logic to accomodate (right now, they all check and set static > > values). > > If you need help here, I can assist. Of course, config-reading is also > done in Tux Paint itself, so you can also examine how I/we did it there. ;)
It's pretty clear in the code; for right now i'll cut and paste something really similar in defaults.cxx. I'll get in touch if there is something that confuses me (being naturally blonde has it's pitfalls). We can cross the bridge of doing something different once we're decided on a direction or design. I know that some people use interpreters to read config files and command line options which populate the environment with the correct variables at startup. Alternatively, I was halfway dreaming of a set of classes that would both read configuration files and then command line options... but with either you could easily achieve somthing like: # tuxpaint-config (<- shows window) # tuxpaint-config --fullscreen (<- shows no window and eats args) tuxpaint.conf written to /etc # Just trying to make it a tool for not just the gui crowd... yea you could use vim to edit the config file, but, if there is a way to write a bunch of options to the config file with a single command just as easily.... just trying to think of some 'all around useful and cool' features. I would love to hear more suggestions in this arena. But that's kinda going off on a tangent. The important part is making a good design for config files and command line options. I imagine samba has a pretty good system considering the things you can do with swat (and the complexity of options for smb). But that's probably waaaay overkill, but maybe not. Dunno. If anyone knows good designs for this sort of thing, please, enlighten me... > > Thx Jan!!! > My pleasure, glad I can help out ;^) even though I am busy I can use the practice.... > -bill! > (working on the website a little; about to commit) > _______________________________________________ > Tuxpaint-dev mailing list > [EMAIL PROTECTED] > http://tux4kids.net/mailman/listinfo/tuxpaint-dev --cheers jan ===== <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< EDUCATION, n. That which discloses to the wise and disguises from the foolish their lack of understanding. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ _______________________________________________ Tuxpaint-dev mailing list [EMAIL PROTECTED] http://tux4kids.net/mailman/listinfo/tuxpaint-dev
