Results 1 to 4 of 4

Thread: Creeat dynamically TGLMovement , TGLMovementPath , TGLPathNode;

  1. #1

    Creeat dynamically TGLMovement , TGLMovementPath , TGLPathNode;

    how to creat un movement Line for model in runtime

    I test this but it does not work :

    Code:
    var mov:TGLMovement;
    mov:=TGLMovement(form1.FindComponent('LabelInfo'+inttostr(NombreDimage)));
    mov:=TGLMovement.Create(Self);
    With mov do begin
    name:'mov'+inttostr(i)       ///move 1 2 3 4 5 6 .... 50
    end;  
      /

  2. #2
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: Creeat dynamically TGLMovement , TGLMovementPath , TGLPathNode;

    Can you please provide more code??


    mov:=TGLMovement(form1.FindComponent('LabelInfo'+i nttostr(NombreDimage)));
    mov:=TGLMovement.Create(Self);
    - You're overwriting mov 2nd time
    NecroSOFT - End of line -

  3. #3

    Re: Creeat dynamically TGLMovement , TGLMovementPath , TGLPathNode;

    any one for help

  4. #4

    Re: Creeat dynamically TGLMovement , TGLMovementPath , TGLPathNode;

    It's not enough to just create an object, you have to assign it to some action through class functions (what are they? I don't know, read class source code or manual as there is nothing online). And your code already has a memory leak as necrodome pointed out.

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
  •