Results 1 to 9 of 9

Thread: TForm inheritance and methods

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sorry for my late reply but I had to do some testing myself about this.
    My conclusion is this:
    When in Lazarus you create new form which inherits from existing one all Lazarus does is make New form with same components and connects their event handlers to the same methods that are used by parent form and its components. This information is sotred in *.lfm file of you newly created form.
    But as soon as you do any action whoch would result in creating new even handler method (doubl clicking on Button for instance) Lazarus conect apropriate event handler to newly created method in new form's unit. So the information about it being inherited is lost.

    When I try same thing in Delphi it automatically adds inherited clause on the beggining on new event method whenever creating any event methods on the new inherited form. This preserves the information about form or component being inherited.
    I gues you will have to do this manually in Lazarus until it gets corrected by Lazarus development team.

  2. #2
    ah ok, now it makes sense. thanks for the effort

  3. #3
    No problem!
    While I haven't used this before I was still curious as of how it is being implemented.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •