View Full Version : SaveSettings Method
harleydude
January 16th, 2007, 06:16 PM
I working on a component using other components as a guide. I have noticed that 2 methods are called for loading/saving of settings. When I run my component in 508 I only see the LoadSettings getting called. When running in 505, my production PC, I see both LoadSettings and SaveSettings being called. Is there something that I need to be doing differently in 508 or is something else wrong? I would like to update my production PC to 508 or 509 to begin using my newly created component.
Rick
harleydude
January 17th, 2007, 11:28 AM
While waiting for a response, I thought I would try using the following in the Enable() method as a way of saving the component settings upon a reset or shutdown.
self.ResetHandler = gir.AddScriptResetCallback(function (...) return self:SaveSettings(unpack(arg)) end)
print ("EventCounter:Enable()", self.ResetHandler)
However it is not working either, self.ResetHandler is being set to nil. Any ideas?
Rick
harleydude
January 17th, 2007, 12:04 PM
Disregard the above. I upgraded to 509 and it appears to work. Sorry for the trouble.
Rick
Rob H
January 17th, 2007, 12:14 PM
Ah, good. That was going to be my first suggestion.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.