[fxruby-users] FXSettings problem
Jannis Pohlmann
info at sten-net.de
Tue Apr 12 17:56:49 EDT 2005
Hi all.
I tried to subclass FXSettings in order to add some functionality to it
but I ran into the following problem.
The code which shall be executed looks like this:
def test
reg = Registry.new("test.reg")
reg.Parse
end
The Registry class basically looks this way:
require "fox12"
include Fox
class Registry < FXSettings
attr_accessor :mFile
attr_accessor :mDefaults
def initialize(aFile)
self.mFile = aFile
self.mDefaults = FXSettings.new
end
def Parse
parseFile(self.mFile, true)
Defaults(false)
end
def Write
unparseFile(self.mFile)
end
def Defaults(aOverwrite)
end
// Then a lot of stuff for setting default values and
// some model-view implementations follow but they aren't of
// of importance regarding the error.
end
When I call reg.Parse now, the ruby interpreter prints out
./Registry.rb:26:in `parseFile': This FXSettings * already released
(RuntimeError)
Does anyone see my - or FXRuby's - mistake?
Regards,
Jannis
More information about the fxruby-users
mailing list