Recent

Author Topic: Docking Example is looking for an HTML file in its folder that does not exist?  (Read 1051 times)

jamie

  • Hero Member
  • *****
  • Posts: 6090
I don't know if this is my install of 2.0.4/6 but when I open the Docking Example in the Examples folder of Lazarus, compile, run and select menuitem two on the top bar it pops up my MS Edge browser failed to find a l.Html  file ?

 Now I can't find anywhere in the example where this file is suppose to be generated because from the text on the menu it states "Dump" which I assume is some report.
 
 I am kind of interested in the Docking technology and was drawn to the example.

 Can someone try that example to see if they can get it to generate a HTML file and how ?
The only true wisdom is knowing you know nothing

wp

  • Hero Member
  • *****
  • Posts: 11853
Looking into the sources of this example I see:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.MenuItem2Click(Sender: TObject);
  2. var
  3.   FileName, err: String;
  4. begin
  5.   FileName := ExtractFilePath(ParamStr(0))+'1.html';
  6.   TDockTree(DockManager).DumpLayout(FileName);
  7.   // how to open it in a cross-platform way?
  8.   err := '';
  9.   if HelpIntfs.ShowHelp('file:///' + FileName, 'Dock Layout', 'text/html', err) <> shrSuccess then
  10.     ShowMessage(err);
  11. end;
Tracing into DumpLayout I see that this method is empty! Therefore, no file is created and thus cannot be displayed. I put some html file into this folder and renamed it to "1.html", and now the method did display it.

Therefore, the issue is that the used DockManager obviously does not implement the functionality of DumpLayout. Unfortunately I am not an expert in docking and cannot help here...
« Last Edit: November 10, 2019, 07:27:15 pm by wp »

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Therefore, the issue is that the used DockManager obviously does not implement the functionality of DumpLayout. Unfortunately I am not an expert in docking and cannot help here...
I supposes HNB can enlighten the original intention. Maciej? are you awake?
« Last Edit: November 10, 2019, 06:54:31 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018