<p>I am writing my first serious wxWidgets program. I'd like to use the wxConfig facility to make the program's user options persistent. However I <em>don't</em> want wxConfigBase to automatically use the Windows registry. Even though I'm initially targeting Windows, I'd prefer to use a configuration (eg .ini) file. Does anyone know a clean and simple way of doing this ? Thanks.</p>

Don't do it!
Trying to create identifiers that are not valid in your language is not a good idea. If you really want to set variables like that, use attribute macros:
```
```
attr_writer :bar
attr_reader :baz
attr_accessor :foo
```
```
Okay, now that you have been warned, here's how to do it.  Just return another instance of the same class every time you get a regular accessor, and collect the needed information as you go.
```
```
class SillySetter
  def initialize path=nil
    @path = path
  end

  def method_missing name,value=nil
    new_path = @path ? "#{@path}.#{name}" : name
    if name.to_s[-1] == ?=
      puts "setting #{new_path} #{value}"
    else
      return self.class.new(path=new_path)
    end
  end
end

s = SillySetter.new
s.foo = 5              # -> setting foo= 5
s.foo.bar.baz = 4      # -> setting foo.bar.baz= 4
```
```
I didn't want to encourage ruby sillyness, but I just couldn't help myself!