OnLoadLibrary

Hello,

I've changed IDEEngine OnLoadFile, OnSaveFile, OnCheckValidFile, ... to read/write/find files on DataBase instead of HDD.

All that works fine.

Now i'd like to intercept OnLoadLibrary to be able to load files from database instead of HDD.

Where and how to do that ?

Thanks in advance for your help.

Best regards
Eric

You should then manually load the script source code from the database by yourself and then register the script as library:

      if ScriptWasAlreadyRegistered(ALibraryName) then
      begin
        NewScript := Scripts.Add;
        NewScript.SourceCode.LoadFromFile(LoadSourceCodeFromDB(ALibraryName));
        ALibrary := NewScript.SelfRegisterAsLibrary(ALibraryName);
        ok := True;
      end;