Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Change location of RBuilder.ini without Designer

edited July 2006 in General
I have the problem, that I don't have write permission in the windows
directory and therefore I get the exception 'Can not write to
RBuilder.ini' when I try to start my app. I have read in the newsgroup,
that I have the change the property IniStorageType of the TppDesigner
component. But I don't use the TppDesigner component so far, I only use
TppReport. Exists a way to change the RBuilder.ini location without the
TppDesigner component?

Regards

Guido

Comments

  • edited July 2006

    Example:

    uses
    ppIniStorage;

    var
    lIniStorageClass: TppIniStorageClass;
    begin

    lIniStorageClass :=
    TppIniStoragePlugIns.GetClassForName(myIniStorageType);

    if (lIniStorageClass <> nil) then
    begin
    TppIniStoragePlugIn.SetClass(lIniStorageClass);
    TppIniStoragePlugIn.SetStorageName(myIniStorageName);
    end;


    end;



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2006
    Hi Nard,

    where should I add your code example? I have added the following code in
    the OnCreate Event of my MainForm, but I still get the error, that the
    RBuilder.ini can not be written.

    procedure TForm2.FormCreate(Sender: TObject);
    begin
    IniStorageClass := TppIniStoragePlugIns.GetClassForName('IniFile');

    if (IniStorageClass <> nil) then
    begin
    TppIniStoragePlugIn.SetClass(IniStorageClass);
    TppIniStoragePlugIn.SetStorageName('c:\RBuildertest.ini');
    end;
    end;

    Regards

    Guido
  • edited August 2006

    I researched this and it looks like the new Toolbar Theme support we added
    for RB 10 is calling the IniStorage from the Initialization section of one
    of the toolbar units. I have created a patch for RB 10.04 that avoids doing
    this. Email support@digital-metaphors.com and request this patch.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.