Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-08

Help! Opening a THelpDialogForm gives runtime error (Resource file not found)

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter Williams

Hi All Fellow Lazarus Fans, *SMILE*

(Sorry that this message is so very long!!!)

I'm now getting the following runtime error:

Error
Project Help Dialog Test raised exception class 'EResNotFound' with message: Resource TTabFrame not found

So... I figure that I'm missing a .res file. Okay. But what do I do about it? I'm a newbie at Linux and even more of a newbie at Lazarus!!! :-)))

Please help!!! What is the exact command I need to enter (I assume in a Shell Terminal) to recreate the missing Resource file???

Note that the HelpDialogForm was created by porting across a Delphi 7 Select Edition program... so, I'm thinking that maybe that process missed creating the Resource file. ? Does that logic make sense???

------- from the file "testunit2.pas"

procedure TForm1.HelpManualClick(Sender: TObject);
const
  instructions_filename = 'instructions.txt';
var
  HelpDialogForm1 : THelpDialogForm;
begin
// Note to Lazarus e-list. I could not remember how to
// correctly create the HelpDialogForm... I'm quite rusty at it :-0))
  //HelpDialogForm1.Create(TComponent);
  //HelpDialogForm1.Create(Self);
  HelpDialogForm1 := THelpDialogForm.Create(Form1);
  try
    HelpDialogForm1.initalize_with_filename( instructions_filename );
    HelpDialogForm1.ShowModal;
  finally
    HelpDialogForm1.Free;
  end;
end;

--------------------------------

2008/8/2 Peter Williams

Show quoted text 82 lines
Hi All, (nb - refer attached .zip archive file, which contains the relevant Lazarus files) I'm trying to compile and debug a Test project. I is a TForm which contains a TMainMenu. The MainMenu contains a "Help" menu item with a submenu item "Help Manual" (IMS = if memory serves). The Help Manual submenu has function key F1 as it's hotkey. When I press F1, what *should happen* is that a TPageDialog form called "HelpDialogForm" should open, with the contents of a text file "instructions.txt" loaded into the different pages of the Forms Tabs. (this is all from memory, so I hope I'm getting it correct!) Okay... This worked (slightly differently) with Borland Delphi 7 Select Edition for M$ Windowz. My OS is Linux Kubuntu 8.04 (Hardy Heron) with KDE 4.0 (I think) -- if that helps. code from file: ---------- unit TestUnit2; {$mode objfpc}{$H+} interface uses Classes, SysUtils, LResources, Forms, Controls, Graphics, {Dialogs,} StdCtrls, Menus, helpdialogunit; type { TForm1 } TForm1 = class(TForm) MainMenu1: TMainMenu; Help: TMenuItem; HelpManual: TMenuItem; procedure HelpManualClick(Sender: TObject); private { private declarations } public { public declarations } end; var Form1: TForm1; implementation { TForm1 } procedure TForm1.HelpManualClick(Sender: TObject); const instructions_filename = 'instructions.txt'; var // I would not be surprised if I have these definitions all wrong!!! ;-) // My Delphi is quite rusty!!! And I'm still a newbie at Lazarus. HelpDialogForm1 : helpdialogunit.THelpDialogForm; begin HelpDialogForm1 := helpdialogunit.TPageControl(Form1); try helpdialogunit.HelpForm1.initalize_with_filename( instructions_filename ); // the ShowModal command on the following line DOES NOT WORK!!! HelpDialogForm.ShowModal; finally HelpForm1.Free; end; end; initialization {$I testunit2.lrs} end. -------------end code from file ------ -- Fond Regards, Peter Eric (aka 'pew') WILLIAMS My free website is: http://pewtas.googlepages.com (or) http://tinyurl.com/yuyejs (please visit my free website and let me know what you think about it.)
Fond Regards, Peter Eric (aka 'pew') WILLIAMS My free website is: http://pewtas.googlepages.com (or) http://tinyurl.com/yuyejs (please visit my free website and let me know what you think about it.)

Reply by email