Sign in Join

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

Mailing lists / lazarus / 2008-08

Delphi .res file missing however the forms are created in code, hence no .dfm/.res file exists

3 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 Mattias and All Lazarus Fans,

2008/8/5 Mattias G?rtner :

Show quoted text 18 lines
Zitat von 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!!! :-))) If a .res file is missing, the compiler gives an error.

Okay, sounds fair ;-)

But: The LCL uses lfm/lrs files instead of .res files for forms, because the current stable compiler does not support res files on all lazarus platforms.

Okay

Show quoted text 6 lines
> Please help!!! What is the exact command I need to enter (I assume in > a Shell Terminal) to recreate the missing Resource file??? You can convert dfm/res files to lfm/lrs files via Tools / Convert Delphi unit to Lazarus unit.

Here is the problem. This code was actually written by one of the Borland Delphi 'Teams' at the Borland Delphi programming newsgroups -- many years ago. { I don't recall whether it was 'Team A' or 'Team B' } I mention this in explanation that I don't really understand fully how the code works. It worked fine under Borland Delphi 7 Select Edition.

The TTabFrame form does *NOT* exist in the folder... it is created /programmatically/ !!! So... I don''t have a dfm/res unit for it.

I have attached "PageDlgUnit1.pas" -- which is the Delphi 7 Select Edition pascal file which defines the TTabFrame forms and creates and frees them. (It's a 4KB file!)

Show quoted text 7 lines
> 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???

BTW -- Thank you for your quick and prompt reply ;-)))

Mattias

Best Wishes,
PEW
Hobart, Tassie, 'Down Under'

Show quoted text 6 lines
_______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

PEW

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.) -------------- next part -------------- A non-text attachment was scrubbed... Name: PagesDlgUnit1.pas Type: text/x-pascal Size: 3249 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/eb6348a1/attachment-0001.bin

Reply by email

Mattias Gaertner
to Peter Williams
Show quoted text 13 lines
[...] Here is the problem. This code was actually written by one of the Borland Delphi 'Teams' at the Borland Delphi programming newsgroups -- many years ago. { I don't recall whether it was 'Team A' or 'Team B' } I mention this in explanation that I don't really understand fully how the code works. It worked fine under Borland Delphi 7 Select Edition. The TTabFrame form does *NOT* exist in the folder... it is created /programmatically/ !!! So... I don''t have a dfm/res unit for it. I have attached "PageDlgUnit1.pas" -- which is the Delphi 7 Select Edition pascal file which defines the TTabFrame forms and creates and frees them. (It's a 4KB file!)

I guess the TTabFrame is defined in the unit FrameUnit? Can you send me the code of this unit?

Notes:
- Each TFrame descendant must have a resource stream, otherwise a EResNotFound exception is raised. This is Delphi compatible.

- Frames are an experimental feature in lazarus. They will be enabled in 0.9.27. See here for more details:
http://wiki.lazarus.freepascal.org/IDE_Development#Frames

[...]

Mattias

Reply by email

Peter Williams
to Mattias Gaertner

Hi Mattias and All,

I'm sending you a lot of small Lazarus files related to this problem I'm having. ;-)))

I hope I'm not sending too many files to you. They're only small ;-)

2008/8/5 Mattias Gaertner :

Show quoted text 19 lines
On Tue, 5 Aug 2008 06:35:53 +1000 "Peter Williams" wrote: >[...] > Here is the problem. This code was actually written by one of the > Borland Delphi 'Teams' at the Borland Delphi programming newsgroups -- > many years ago. { I don't recall whether it was 'Team A' or 'Team B' } > I mention this in explanation that I don't really understand fully how > the code works. It worked fine under Borland Delphi 7 Select Edition. > > The TTabFrame form does *NOT* exist in the folder... it is created > /programmatically/ !!! So... I don''t have a dfm/res unit for it. > > I have attached "PageDlgUnit1.pas" -- which is the Delphi 7 Select > Edition pascal file which defines the TTabFrame forms and creates and > frees them. (It's a 4KB file!) I guess the TTabFrame is defined in the unit FrameUnit? Can you send me the code of this unit?
------------------ file "FrameUnit.pas -------------------------
unit FrameUnit;
{$MODE Delphi}
interface
uses
  Forms, Controls, Classes, StdCtrls, LResources;
type
  TTabFrame = class(TFrame)
    Memo1: TMemo;
  private
    { Private declarations }
  public
    { Public declarations }
  end;
implementation
initialization
  {$i FrameUnit.lrs}
end.
-------------------------------------------------
Show quoted text 19 lines
Notes: - Each TFrame descendant must have a resource stream, otherwise a EResNotFound exception is raised. This is Delphi compatible. - Frames are an experimental feature in lazarus. They will be enabled in 0.9.27. See here for more details: http://wiki.lazarus.freepascal.org/IDE_Development#Frames >[...] Mattias _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Thanks again for your help

Best Wishes,
PEW

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.) -------------- next part -------------- A non-text attachment was scrubbed... Name: helpdialogunit.pas Type: text/x-pascal Size: 3280 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0003.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: helpdialogunit.lfm Type: application/octet-stream Size: 1730 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0006.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: helpdialogform.lfm Type: application/octet-stream Size: 1718 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0007.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: PagesDlgUnit1.pas Type: text/x-pascal Size: 3249 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0004.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: PagesDlgUnit1.lfm Type: application/octet-stream Size: 1718 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0008.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: PagesDlgUnit1.lfm Type: application/octet-stream Size: 1718 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0009.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: FrameUnit.pas Type: text/x-pascal Size: 315 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0005.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: FrameUnit.lfm Type: application/octet-stream Size: 425 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0010.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: TestHelpproject1.lpr Type: application/octet-stream Size: 379 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080805/e3f67c9b/attachment-0011.obj

Reply by email