Jump to content

Pablo

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Pablo

  1. 15 hours ago, Farshad Mohajeri said:

    Hi Pablo,

    Are these Datamodules created using uniGUI wizard?

    Hi Farshad,

    I am reusing datamodules that were created in other projects and using directives to create them in my unigui project, example

    {$IFDEF UNIGUI}
    function DataModule1: TDataModule1;
    {$ELSE}

      for other applications
    {$ENDIF}

     

    {$IFDEF UNIGUI}
    initialization
      RegisterModuleClass(TDataModule1);
    {$ENDIF}

     

    because I need to reuse what I already have an not duplicate it.

    What is the solution to the questions asked above?

  2. On 3/28/2021 at 9:30 AM, Farshad Mohajeri said:

    Datamodules are created and destroyed along with the session.

    Hi Farshad, in my case it doesn't happen that way.

    I have a datamodule A that uses a datamodule B, are created when you start the session but during the session B is destroyed, I don't know why that happens, finally I get an access violation when trying to access a table.

    Is there a way to control the destruction of the datamodule? or know why one of them is destroyed?

  3. Good morning, i am using unigui and normal vcl datamodule started as any unigui datamodule does, creation works correctly.
    I have global variables that are initialized with the datamodule and I use them to filter data from tables, the problem is that the destroy of the datamodule is executed without having finished the session, they release my global variables and when I try to use them they give me access violation.
    
    How can I solve this issue, I thank you in advance for your help
×
×
  • Create New...