Can it has something to do that we create TppDesignerWindow classes at runtime. In the code i see that this class is also creating TppIniStorage classes.
For future reference - please post questions to a single destination (newsgroups or email). I cannot stress that point enough. If you need to send an example project then please use email only.
I received the sample code. I think you are assuming that ($TEMPDIR) has some special meaning - however it does not. You have to write some code to translate that into an actual directory path (C:Windows\Temp or whatever). You could override CreateCustomIniFile to do that. In ppUtils, there is a ppGetTempPath method that calls the windows api to determine the path.
Example:
{translate the ($TEMPDIR) prefix, if present} aStorageName := StringReplace(aStorageName, cTempDIR, ppGetTempPath, [rfReplaceAll, rfIgnoreCase]);
Rather than creating a custom class, I think the simplest solution would be to add some initialization code set TppDesigner.IniStorageName prior to calling Designer.Show:
uses ppUtils;
myDesigner.IniStorageName := ppGetTempPath;
Best regards,
Nard Moseley Digital Metaphors www.digital-metaphors.com
I recommend using TppDesigner - let it create and manage the TppDesignerWindow. If you do not want to do that (for whatever reason), then please see the source code to TppDesigner (ppEndUsr.pas) to see how it manages the IniStorageName.
Best regards,
Nard Moseley Digital Metaphors www.digital-metaphors.com
Comments
Can it has something to do that we create TppDesignerWindow classes at
runtime.
In the code i see that this class is also creating TppIniStorage classes.
Eric
You might try storing the ini information inside the registry rather than in
a file. Change IniStorageType to Registry.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
It's not possible to set IniStorageType for a TppDesignerWindow or is it?
Eric
For future reference - please post questions to a single destination
(newsgroups or email). I cannot stress that point enough. If you need to
send an example project then please use email only.
I received the sample code. I think you are assuming that ($TEMPDIR) has
some special meaning - however it does not. You have to write some code to
translate that into an actual directory path (C:Windows\Temp or whatever).
You could override CreateCustomIniFile to do that. In ppUtils, there is a
ppGetTempPath method that calls the windows api to determine the path.
Example:
{translate the ($TEMPDIR) prefix, if present}
aStorageName := StringReplace(aStorageName, cTempDIR, ppGetTempPath,
[rfReplaceAll, rfIgnoreCase]);
Rather than creating a custom class, I think the simplest solution would be
to add some initialization code set TppDesigner.IniStorageName prior to
calling Designer.Show:
uses
ppUtils;
myDesigner.IniStorageName := ppGetTempPath;
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Sorry for the double questions.
You mention:
be
But we create a TppDesignerWindow and that class has no IniStorageName
property.
Eric
I recommend using TppDesigner - let it create and manage the
TppDesignerWindow. If you do not want to do that (for whatever reason), then
please see the source code to TppDesigner (ppEndUsr.pas) to see how it
manages the IniStorageName.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com