TppThemeManager.SavePreferences
Seems to always write to an INI file even though our Designer is set to
save to registry. As such our users can get the following exception
occasionally:
exception class : EFCreateError
exception message : Cannot create file "C:\Documents and
Settings\mrandall\Local Settings\Application
Data\RBuilder\RBuilder.ini". The process cannot access the file because
it is being used by another process.
save to registry. As such our users can get the following exception
occasionally:
exception class : EFCreateError
exception message : Cannot create file "C:\Documents and
Settings\mrandall\Local Settings\Application
Data\RBuilder\RBuilder.ini". The process cannot access the file because
it is being used by another process.
This discussion has been closed.
Comments
In a simple test here I cannot reproduce the issue. I reviewed the source
code and traced with the debugger but do not find any issues. In
ppEndUsr.pas there is a TppDesigner.ConfigureIniStorage method that setup up
the storage type. In ppToolbarTBX there is a TppThemeManager.SavePreferences
method that uses the registered storage type.
Try tracing the RB source for the above methods in the Delphi debugger.
Perhaps there is a timing issue.
Best regards,
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Hi Nard,
we're having same problems but not everytime on closeing the designer!
It is appearing sometimes and sometimes not. It seems that the Designer
is blocking the file by it self somewhere ...
--
TppDesigners that have different IniStorageType or IniStorageName values.
That might cause a conflict.
I need either a simple example that demonstrates the issue or steps to
reproduce. The code in question has been in place for years - so perhaps a
rare case. Or might be memory corruption somewhere in the app, which can
cause weird errors to appear - I've had this happen several times. Only way
to fix that type of error is to use FastMM with full debug settings to
monitor all of the memory buffers.
Best regards,
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
--
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Ah, of course it is. I'm calling ...
TppThemeManager.SetCurrentTheme('Office2007');
in the "initialization" section of the unit that hosts my TppDesigner.
Presumably I can move it to the form's OnCreate event?
That looks like it will work, give it a try.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
It does
Ta.